dom/base/test/test_document.all_unqualified.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/base/test/test_document.all_unqualified.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +<html>
     1.5 +<head>
     1.6 +  <meta charset="UTF-8">
     1.7 +  <title>Test for Bug 823283</title>
     1.8 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.10 +</head>
    1.11 +<body>
    1.12 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=823283">Mozilla Bug 823283</a>
    1.13 +<p id="display"></p>
    1.14 +<div id="content" style="display: none">
    1.15 +<form id="f" onreset="window.valueOfAll = all; SimpleTest.executeSoon(finishTest); return false;">
    1.16 +</form>
    1.17 +</div>
    1.18 +<pre id="test">
    1.19 +<script>
    1.20 +SimpleTest.waitForExplicitFinish();
    1.21 +
    1.22 +var all = 17;
    1.23 +var valueOfAll = "initial value";
    1.24 +
    1.25 +function finishTest()
    1.26 +{
    1.27 +  is(valueOfAll, document.all,
    1.28 +     "wrong value for |all| in event handler attribute; note that the wrong " +
    1.29 +     "value may be |document.forms.f.all| in browsers with an 'all' property " +
    1.30 +     "on elements");
    1.31 +  SimpleTest.finish();
    1.32 +}
    1.33 +
    1.34 +window.addEventListener("load", function() { document.getElementById("f").reset(); }, false);
    1.35 +</script>
    1.36 +</pre>
    1.37 +</body>
    1.38 +</html>

mercurial