xrDevice_requestSession_no_mode.https.html (762B)
1 <!DOCTYPE html> 2 <body> 3 <script src=/resources/testharness.js></script> 4 <script src=/resources/testharnessreport.js></script> 5 <script src="resources/webxr_util.js"></script> 6 <script src="resources/webxr_test_constants.js"></script> 7 <script> 8 xr_promise_test( 9 "Requesting a session with no mode rejects", 10 (t) => { 11 return navigator.xr.test.simulateDeviceConnection(VALID_NON_IMMERSIVE_DEVICE) 12 .then( (controller) => new Promise((resolve) => { 13 navigator.xr.test.simulateUserActivation( () => { 14 t.step_func(() => { 15 assert_throws_js(TypeError, () => navigator.xr.requestSession()) 16 }) 17 resolve() 18 }); 19 })); 20 }); 21 </script> 22 </body>