|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=633602 |
|
5 |
|
6 Test DOM tree in full screen |
|
7 --> |
|
8 <head> |
|
9 <title>Bug 633602 - file_DOMtree.html</title> |
|
10 <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"> |
|
11 </script> |
|
12 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"> |
|
13 </script> |
|
14 <script type="application/javascript" src="pointerlock_utils.js"></script> |
|
15 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
16 <style> |
|
17 </style> |
|
18 </head> |
|
19 <body> |
|
20 <a target="_blank" |
|
21 href="https://bugzilla.mozilla.org/show_bug.cgi?id=633602"> |
|
22 Mozilla Bug 633602 |
|
23 </a> |
|
24 <pre id="test"> |
|
25 <script type="text/javascript"> |
|
26 /* |
|
27 * Test for Bug 633602 |
|
28 * Checks if element is attached to the DOM Tree before locking |
|
29 * the pointer |
|
30 */ |
|
31 |
|
32 SimpleTest.waitForExplicitFinish(); |
|
33 |
|
34 var div = document.createElement("div") |
|
35 , withouthDOM = false; |
|
36 |
|
37 function runTests () { |
|
38 ok(withouthDOM, "If an element is NOT in the " + |
|
39 "DOM Tree pointer should NOT be locked"); |
|
40 } |
|
41 |
|
42 document.addEventListener("mozpointerlockerror", function (e) { |
|
43 withouthDOM = true; |
|
44 runTests(); |
|
45 SimpleTest.finish(); |
|
46 }, false); |
|
47 |
|
48 function start() { |
|
49 div.mozRequestPointerLock(); |
|
50 } |
|
51 </script> |
|
52 </pre> |
|
53 </body> |
|
54 </html> |