зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1547014 [wpt PR 16434] - Rename XR supportsSessionMode to supportsSession, a=testonly
Automatic update from web-platform-tests Rename XR supportsSessionMode to supportsSession Bug: 955033 Change-Id: Ie98cfd7954be59189789d0bbcda73f3fdbe63f3a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577676 Commit-Queue: Brandon Jones <bajones@chromium.org> Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Klaus Weidner <klausw@chromium.org> Cr-Commit-Position: refs/heads/master@{#653783} -- wpt-commits: 1bc463c5211a8280f2a8e79aab14fa955f735ea0 wpt-pr: 16434
This commit is contained in:
Родитель
f05b3a4f43
Коммит
9e2cdf3b37
|
@ -23,9 +23,9 @@ promise_test(async t => {
|
|||
{types: ['feature-policy-violation']}).observe();
|
||||
});
|
||||
try {
|
||||
await navigator.xr.supportsSessionMode('inline');
|
||||
await navigator.xr.supportsSession('inline');
|
||||
} catch (err) {
|
||||
// If no XR devices are available, supportsSessionMode() will reject with a
|
||||
// If no XR devices are available, supportsSession() will reject with a
|
||||
// NotSupportedError, but the report should be generated anyway.
|
||||
assert_equals(err.name, 'NotSupportedError');
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ promise_test(async (t) => {
|
|||
new ReportingObserver((reports, observer) => resolve([reports, observer]),
|
||||
{types: ['feature-policy-violation']}).observe();
|
||||
});
|
||||
await promise_rejects(t, 'SecurityError', navigator.xr.supportsSessionMode('inline'),
|
||||
await promise_rejects(t, 'SecurityError', navigator.xr.supportsSession('inline'),
|
||||
"XR device access should not be allowed in this document.");
|
||||
const [reports, observer] = await report;
|
||||
check_report_format(reports, observer);
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
<script src="resources/webxr_util.js"></script>
|
||||
<script>
|
||||
xr_promise_test(
|
||||
"supportsSessionMode resolves when immersive options supported",
|
||||
"supportsSession resolves when immersive options supported",
|
||||
() => {
|
||||
return XRTest.simulateDeviceConnection({ supportsImmersive:true })
|
||||
.then( (controller) => navigator.xr.supportsSessionMode('immersive-vr'));
|
||||
.then( (controller) => navigator.xr.supportsSession('immersive-vr'));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
<script src="resources/webxr_util.js"></script>
|
||||
<script>
|
||||
xr_promise_test(
|
||||
"supportsSessionMode rejects when options not supported",
|
||||
"supportsSession rejects when options not supported",
|
||||
(t) => {
|
||||
return XRTest.simulateDeviceConnection({ supportsImmersive:false })
|
||||
.then( (controller) => {
|
||||
return promise_rejects(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.xr.supportsSessionMode('immersive-vr')
|
||||
navigator.xr.supportsSession('immersive-vr')
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
<script src="resources/webxr_util.js"></script>
|
||||
<script>
|
||||
xr_promise_test(
|
||||
"supportsSessionMode resolves when inline options supported",
|
||||
"supportsSession resolves when inline options supported",
|
||||
(t) => {
|
||||
return XRTest.simulateDeviceConnection({ supportsImmersive:true })
|
||||
.then( (controller) => {
|
||||
// Inline sessions should be supported.
|
||||
return navigator.xr.supportsSessionMode('inline');
|
||||
return navigator.xr.supportsSession('inline');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче