1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/pointerlock/file_withoutDOM.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,54 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 + <!-- 1.7 + https://bugzilla.mozilla.org/show_bug.cgi?id=633602 1.8 + 1.9 + Test DOM tree in full screen 1.10 + --> 1.11 + <head> 1.12 + <title>Bug 633602 - file_DOMtree.html</title> 1.13 + <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"> 1.14 + </script> 1.15 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"> 1.16 + </script> 1.17 + <script type="application/javascript" src="pointerlock_utils.js"></script> 1.18 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.19 + <style> 1.20 + </style> 1.21 + </head> 1.22 + <body> 1.23 + <a target="_blank" 1.24 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=633602"> 1.25 + Mozilla Bug 633602 1.26 + </a> 1.27 + <pre id="test"> 1.28 + <script type="text/javascript"> 1.29 + /* 1.30 + * Test for Bug 633602 1.31 + * Checks if element is attached to the DOM Tree before locking 1.32 + * the pointer 1.33 + */ 1.34 + 1.35 + SimpleTest.waitForExplicitFinish(); 1.36 + 1.37 + var div = document.createElement("div") 1.38 + , withouthDOM = false; 1.39 + 1.40 + function runTests () { 1.41 + ok(withouthDOM, "If an element is NOT in the " + 1.42 + "DOM Tree pointer should NOT be locked"); 1.43 + } 1.44 + 1.45 + document.addEventListener("mozpointerlockerror", function (e) { 1.46 + withouthDOM = true; 1.47 + runTests(); 1.48 + SimpleTest.finish(); 1.49 + }, false); 1.50 + 1.51 + function start() { 1.52 + div.mozRequestPointerLock(); 1.53 + } 1.54 + </script> 1.55 + </pre> 1.56 + </body> 1.57 +</html>