Replace JSValue #defines with static constexpr values.
[WebKit-https.git] / LayoutTests / pointer-lock / lock-lost-on-alert.html
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../http/tests/resources/js-test-pre.js"></script>
5 <script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
6 </head>
7 <body>
8 <div>
9   <div id="target1"></div>
10 </div>
11 <script>
12     description("Test that pointerlockchange event is dispatched when lock is lost.")
13     window.jsTestIsAsync = true;
14     shouldBeDefined("window.testRunner");
15
16     targetDiv1 = document.getElementById("target1");
17
18     todo = [
19         function () {
20             expectOnlyChangeEvent("Lock targetDiv1.");
21             targetDiv1.requestPointerLock();
22             // doNextStep called by event handler.
23         },
24         function () {
25             shouldBe("document.pointerLockElement", "targetDiv1");
26             doNextStepWithUserGesture();
27         },
28         function () {
29             expectOnlyChangeEvent("Alert cancel targetDiv1 lock.");
30             alert('Alert text');
31             shouldBe("document.pointerLockElement", "null");
32         },
33     ];
34     doNextStepWithUserGesture();
35 </script>
36 <script src="../http/tests/resources/js-test-post.js"></script>
37 </body>
38 </html>
39