clang-tidy: Fix unnecessary copy/ref churn of for loop variables in WTF/JavaScriptCore
[WebKit-https.git] / LayoutTests / pointer-lock / pointerlockelement-null-when-pending.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 pointerLockElement is null when a lock is pending.")
13     window.jsTestIsAsync = true;
14
15     targetDiv1 = document.getElementById("target1");
16
17     todo = [
18         function () {
19             shouldBe("document.pointerLockElement", "null");
20             testRunner.setPointerLockWillRespondAsynchronously();
21             expectOnlyChangeEvent("Lock.");
22             targetDiv1.requestPointerLock();
23             doNextStep();
24         },
25         function () {
26             shouldBe("document.pointerLockElement", "null");
27             testRunner.didAcquirePointerLock();
28             // doNextStep called from event handler set with expect...
29         },
30         function () {
31             shouldBe("document.pointerLockElement", "targetDiv1");
32             expectOnlyChangeEvent("Unlock.");
33             document.exitPointerLock();
34             shouldBe("document.pointerLockElement", "targetDiv1");
35             // doNextStep called from event handler set with expect...
36         },
37         function () {
38             shouldBe("document.pointerLockElement", "null");
39             doNextStep();
40         },
41     ];
42     doNextStep();
43 </script>
44 <script src="../http/tests/resources/js-test-post.js"></script>
45 </body>
46 </html>