Fix xrDevice_requestSession_no_mode to test for a throw, not a rejection

This commit is contained in:
Manish Goregaokar 2019-12-11 20:30:46 -08:00
parent 5b3132ebb7
commit 326902220c
3 changed files with 5 additions and 10 deletions

View file

@ -727499,7 +727499,7 @@
"testharness" "testharness"
], ],
"webxr/xrDevice_requestSession_no_mode.https.html": [ "webxr/xrDevice_requestSession_no_mode.https.html": [
"de77b38c868e3b5dad88b8eface770b16b5f16c1", "5ef249c58186131f8e467da48cfafebe65df9adf",
"testharness" "testharness"
], ],
"webxr/xrDevice_requestSession_non_immersive_no_gesture.https.html": [ "webxr/xrDevice_requestSession_non_immersive_no_gesture.https.html": [

View file

@ -1,4 +0,0 @@
[xrDevice_requestSession_no_mode.https.html]
[Requesting a session with no mode rejects]
expected: FAIL

View file

@ -11,11 +11,10 @@
return navigator.xr.test.simulateDeviceConnection(VALID_NON_IMMERSIVE_DEVICE) return navigator.xr.test.simulateDeviceConnection(VALID_NON_IMMERSIVE_DEVICE)
.then( (controller) => new Promise((resolve) => { .then( (controller) => new Promise((resolve) => {
navigator.xr.test.simulateUserActivation( () => { navigator.xr.test.simulateUserActivation( () => {
resolve(promise_rejects( t.step_func(() => {
t, assert_throws(new TypeError(), () => navigator.xr.requestSession())
new TypeError(), })
navigator.xr.requestSession() resolve()
))
}); });
})); }));
}); });