Commit 2b7e048c authored by eric@webkit.org's avatar eric@webkit.org

2010-01-28 Anton Muhin <antonm@google.com>

        Reviewed by Alexey Proskuryakov.

        Add layout tests to verify assignment to items of NodeList
        https://bugs.webkit.org/show_bug.cgi?id=34213

        * fast/dom/NodeList/nodelist-item-assignment-expected.txt: Added.
        * fast/dom/NodeList/nodelist-item-assignment.html: Added.

git-svn-id: svn://svn.chromium.org/blink/trunk@54004 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f2953324
2010-01-28 Anton Muhin <antonm@google.com>
Reviewed by Alexey Proskuryakov.
Add layout tests to verify assignment to items of NodeList
https://bugs.webkit.org/show_bug.cgi?id=34213
* fast/dom/NodeList/nodelist-item-assignment-expected.txt: Added.
* fast/dom/NodeList/nodelist-item-assignment.html: Added.
2010-01-28 Ben Murdoch <benm@google.com>
Reviewed by Simon Hausmann.
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
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS first == null is false
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS nodeList[0] is first
PASS successfullyParsed is true
TEST COMPLETE
<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>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment