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("bug 90391: pointer lock mouse move events then window.open should not crash.")
13 window
.jsTestIsAsync
= true;
15 targetdiv1
= document
.getElementById("target1");
19 debug(" Locking targetdiv1.")
20 targetdiv1
.requestPointerLock();
21 document
.onpointerlockchange = function () {
22 document
.onpointerlockchange
= null;
23 testPassed("document.onpointerlockchange event received.");
28 debug(" Sending mouse move events.")
29 var mouseMoveEvents
= 0;
30 targetdiv1
.onmousemove = function () {
31 if (++mouseMoveEvents
== 2) {
32 targetdiv1
.onmousemove
= null;
36 if (window
.eventSender
) {
37 eventSender
.mouseMoveTo(100, 100);
38 eventSender
.mouseMoveTo(200, 200);
42 debug(" Calling window.open.")
45 testPassed("Didn't crash");
46 document
.exitPointerLock();
50 doNextStepWithUserGesture();