file_pointerlockerror.html (1105B)
1 <!DOCTYPE HTML> 2 <html> 3 <!--https://bugzilla.mozilla.org/show_bug.cgi?id=633602--> 4 <head> 5 <title>Bug 633602</title> 6 <script src="/tests/SimpleTest/EventUtils.js"> 7 </script> 8 <script src="/tests/SimpleTest/SimpleTest.js"> 9 </script> 10 <script type="application/javascript" src="pointerlock_utils.js"></script> 11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 12 </head> 13 <body> 14 <a target="_blank" 15 href="https://bugzilla.mozilla.org/show_bug.cgi?id=633602"> 16 Mozilla Bug 633602 17 </a> 18 19 <pre id="test"> 20 <script type="text/javascript"> 21 /* 22 * Test for Bug 633602 23 * Make sure pointerlockerror event fires. 24 */ 25 26 SimpleTest.waitForExplicitFinish(); 27 28 document.addEventListener("pointerlockerror", function (e) { 29 ok(true, "pointerlockerror event should fire."); 30 SimpleTest.finish(); 31 }); 32 33 function start() { 34 // element not in the DOM, not fullscreen, should fail to lock 35 div = document.createElement("div"); 36 div.requestPointerLock(); 37 } 38 </script> 39 </pre> 40 </body> 41 </html>