4 <script src=
"../resources/js-test.js"></script>
5 <script src=
"../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
9 <div id=
"target1"></div>
12 description("Test pointerlock then fullscreen.")
13 window
.jsTestIsAsync
= true;
14 shouldBeDefined("window.testRunner");
16 targetDiv1
= document
.getElementById("target1");
20 expectOnlyChangeEvent("Lock targetDiv1.");
21 targetDiv1
.requestPointerLock();
22 // doNextStep called by event handler.
25 shouldBe("document.pointerLockElement", "targetDiv1");
26 document
.body
.onmousedown = function () {
27 targetDiv1
.webkitRequestFullscreen();
29 document
.onwebkitfullscreenchange = function () {
32 eventSender
.mouseDown();
35 shouldBe("document.pointerLockElement", "targetDiv1");
36 shouldBe("document.webkitFullscreenElement", "targetDiv1");
40 doNextStepWithUserGesture();