| <!doctype html> |
| <!-- |
| Used to test that the promise returned by WebVR's requestPresent does not get |
| resolved or rejected while the DON flow is active. |
| --> |
| <html> |
| <head> |
| <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css"> |
| </head> |
| <body> |
| <canvas id="webgl-canvas"></canvas> |
| <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script> |
| <script src="../resources/webxr_e2e.js"></script> |
| <script src="../resources/webvr_boilerplate.js"></script> |
| <script> |
| var t = async_test("Presentation promise is unresolved during DON flow"); |
| function onVrRequestPresentWithDon() { |
| vrDisplay.requestPresent([{source: webglCanvas}]).then( () => { |
| t.step( () => { |
| assert_unreached("requestPresent promise resolved"); |
| }); |
| }, () => { |
| t.step( () => { |
| assert_unreached("requestPresent promise rejected"); |
| }); |
| }); |
| window.setTimeout( () => {t.done();}, 2000); |
| } |
| webglCanvas.onclick = onVrRequestPresentWithDon; |
| </script> |
| </body> |
| </html> |