summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/NodeList/nodelist-item-assignment.html
blob: 5a5b971733e27296f90bbb8d31ed10d6836cd96a (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
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<ol></ol>

<div id="console"></div>

<script>
description(
  'This tests that indexed assignments to items of a NodeList do not override original values. ' +
  'See http://code.google.com/p/chromium/issues/detail?id=27967');

var nodeList = document.getElementsByTagName('ol');
var first = nodeList[0];
shouldBeFalse("first == null");

nodeList[0] = null;
for (var i = 0; i < 13; i++) {
  shouldBe("nodeList[0]", "first");
}

var successfullyParsed = true;
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>