dom/tests/mochitest/pointerlock/file_withoutDOM.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial