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>
9 <div id="target1"></div>
12 description("Test pointerLockElement is null when a lock is pending.")
13 window.jsTestIsAsync = true;
15 targetDiv1 = document.getElementById("target1");
19 shouldBe("document.webkitPointerLockElement", "null");
20 testRunner.setPointerLockWillRespondAsynchronously();
21 expectOnlyChangeEvent("Lock.");
22 targetDiv1.webkitRequestPointerLock();
26 shouldBe("document.webkitPointerLockElement", "null");
27 testRunner.didAcquirePointerLock();
28 // doNextStep called from event handler set with expect...
31 shouldBe("document.webkitPointerLockElement", "targetDiv1");
32 expectOnlyChangeEvent("Unlock.");
33 document.webkitExitPointerLock();
34 shouldBe("document.webkitPointerLockElement", "targetDiv1");
35 // doNextStep called from event handler set with expect...
38 shouldBe("document.webkitPointerLockElement", "null");
44 <script src="../http/tests/resources/js-test-post.js"></script>