Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / base / test / test_document.all_unqualified.html
blob648ff6bb4863f26c134752d0f873a69bb2e2d354
1 <html>
2 <head>
3 <meta charset="UTF-8">
4 <title>Test for Bug 823283</title>
5 <script 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()
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();
31 window.addEventListener("load", function() { document.getElementById("f").reset(); });
32 </script>
33 </pre>
34 </body>
35 </html>