dom/base/test/test_document.all_unqualified.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 <html>
     2 <head>
     3   <meta charset="UTF-8">
     4   <title>Test for Bug 823283</title>
     5   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     7 </head>
     8 <body>
     9 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=823283">Mozilla Bug 823283</a>
    10 <p id="display"></p>
    11 <div id="content" style="display: none">
    12 <form id="f" onreset="window.valueOfAll = all; SimpleTest.executeSoon(finishTest); return false;">
    13 </form>
    14 </div>
    15 <pre id="test">
    16 <script>
    17 SimpleTest.waitForExplicitFinish();
    19 var all = 17;
    20 var valueOfAll = "initial value";
    22 function finishTest()
    23 {
    24   is(valueOfAll, document.all,
    25      "wrong value for |all| in event handler attribute; note that the wrong " +
    26      "value may be |document.forms.f.all| in browsers with an 'all' property " +
    27      "on elements");
    28   SimpleTest.finish();
    29 }
    31 window.addEventListener("load", function() { document.getElementById("f").reset(); }, false);
    32 </script>
    33 </pre>
    34 </body>
    35 </html>

mercurial