dom/tests/mochitest/pointerlock/file_withoutDOM.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3   <!--
     4   https://bugzilla.mozilla.org/show_bug.cgi?id=633602
     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          */
    32         SimpleTest.waitForExplicitFinish();
    34         var div = document.createElement("div")
    35           , withouthDOM = false;
    37         function runTests () {
    38           ok(withouthDOM, "If an element is NOT in the " +
    39             "DOM Tree pointer should NOT be locked");
    40         }
    42         document.addEventListener("mozpointerlockerror", function (e) {
    43           withouthDOM = true;
    44           runTests();
    45           SimpleTest.finish();
    46         }, false);
    48         function start() {
    49           div.mozRequestPointerLock();
    50         }
    51       </script>
    52     </pre>
    53   </body>
    54 </html>

mercurial