dom/tests/mochitest/general/test_focus_legend_noparent.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 <html>
     2 <head>
     3 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     4 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
     5 <script type="text/javascript">
     7 SimpleTest.waitForExplicitFinish();
     9 function runTest()
    10 {
    11     window.focus();
    12     var g = document.createElementNS("http://www.w3.org/1999/xhtml", "legend");
    13     document.body.appendChild(g);
    14     setTimeout(g.focus.bind(g), 0);
    15     setTimeout(done, 10);
    16 }
    18 function done()
    19 {
    20   ok(document.hasFocus(), "document is still focused");
    21   is(document.activeElement, document.body, "document has no focused element")
    22   SimpleTest.finish();
    23 }
    25 SimpleTest.waitForFocus(runTest);
    26 </script>
    27 </head>
    29 <p id="display"></p>
    30 <div id="content" style="display: none">
    31 </div>
    33 <body onblur="dump('blurred window!\n')"></body>
    34 </html>

mercurial