OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 <script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js">
</script> | 5 <script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness-pref
ixed.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <div> | 8 <div> |
9 <div id="target1"></div> | 9 <div id="target1"></div> |
10 </div> | 10 </div> |
11 <script> | 11 <script> |
12 description("Test locking an element not in a document is rejected and point
erlockerror event dispatched.") | 12 description("Test locking an element not in a document is rejected and point
erlockerror event dispatched.") |
13 window.jsTestIsAsync = true; | 13 window.jsTestIsAsync = true; |
14 | 14 |
15 targetDiv1 = document.getElementById("target1"); | 15 targetDiv1 = document.getElementById("target1"); |
16 | 16 |
17 todo = [ | 17 todo = [ |
18 function () { | 18 function () { |
19 shouldNotBe("targetDiv1.parentElement", "null"); | 19 shouldNotBe("targetDiv1.parentElement", "null"); |
20 expectOnlyErrorEvent("Remove targetDiv1 from document, and try to lo
ck it."); | 20 expectOnlyErrorEvent("Remove targetDiv1 from document, and try to lo
ck it."); |
21 targetDiv1.parentElement.removeChild(targetDiv1); | 21 targetDiv1.parentElement.removeChild(targetDiv1); |
22 shouldBe("targetDiv1.parentElement", "null"); | 22 shouldBe("targetDiv1.parentElement", "null"); |
23 targetDiv1.webkitRequestPointerLock(); | 23 targetDiv1.webkitRequestPointerLock(); |
24 // doNextStep called by event handler. | 24 // doNextStep called by event handler. |
25 }, | 25 }, |
26 ]; | 26 ]; |
27 doNextStepWithUserGesture(); | 27 doNextStepWithUserGesture(); |
28 </script> | 28 </script> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |