summaryrefslogtreecommitdiffstats
path: root/dom/base/test/test_document.all_unqualified.html
blob: 648ff6bb4863f26c134752d0f873a69bb2e2d354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html>
<head>
  <meta charset="UTF-8">
  <title>Test for Bug 823283</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=823283">Mozilla Bug 823283</a>
<p id="display"></p>
<div id="content" style="display: none">
<form id="f" onreset="window.valueOfAll = all; SimpleTest.executeSoon(finishTest); return false;">
</form>
</div>
<pre id="test">
<script>
SimpleTest.waitForExplicitFinish();

var all = 17;
var valueOfAll = "initial value";

function finishTest()
{
  is(valueOfAll, document.all,
     "wrong value for |all| in event handler attribute; note that the wrong " +
     "value may be |document.forms.f.all| in browsers with an 'all' property " +
     "on elements");
  SimpleTest.finish();
}

window.addEventListener("load", function() { document.getElementById("f").reset(); });
</script>
</pre>
</body>
</html>