| <script src="../http/tests/resources/js-test-pre.js"></script> |
| <script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script> |
| description("Test pointerLockElement is null when a lock is pending.") |
| window.jsTestIsAsync = true; |
| targetDiv1 = document.getElementById("target1"); |
| shouldBe("document.pointerLockElement", "null"); |
| testRunner.setPointerLockWillRespondAsynchronously(); |
| expectOnlyChangeEvent("Lock."); |
| targetDiv1.requestPointerLock(); |
| shouldBe("document.pointerLockElement", "null"); |
| testRunner.didAcquirePointerLock(); |
| // doNextStep called from event handler set with expect... |
| shouldBe("document.pointerLockElement", "targetDiv1"); |
| expectOnlyChangeEvent("Unlock."); |
| document.exitPointerLock(); |
| shouldBe("document.pointerLockElement", "targetDiv1"); |
| // doNextStep called from event handler set with expect... |
| shouldBe("document.pointerLockElement", "null"); |
| <script src="../http/tests/resources/js-test-post.js"></script> |