
This CL moves third_party/WebKit/LayoutTests to third_party/blink/web_tests. NOTRY=true NOAUTOREVERT=true NOPRESUBMIT=true NOTREECHECKS=true TBR=robertma@chromium.org Bug: 843412 Change-Id: Ibb588b93d1579bcd1cb68df0a50efd8653f8724f Reviewed-on: https://chromium-review.googlesource.com/c/1328627 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#610740}
35 lines
1.0 KiB
HTML
35 lines
1.0 KiB
HTML
<html>
|
|
<body>
|
|
<p>This test checks whether DOM wrappers created by NodeIterator have their
|
|
prototypes attached to the correct objects. These nodes are from the child
|
|
frame, so that's where their prototypes should be attached.</p>
|
|
|
|
<p>Unfortunately, our implementation is buggy and we get wrappers from the
|
|
parent frame here. This test documents the bug so we'll know when we fix
|
|
it.</p>
|
|
<div id="console"></div>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
Node.prototype.foo = "parent";
|
|
|
|
function logNode(node) {
|
|
var result = node.foo == "child" ? "PASS" : "FAIL";
|
|
document.getElementById("console").innerHTML += node.id + ": " + node.foo + " " + result + "<br>"
|
|
}
|
|
|
|
function runTest() {
|
|
var it = frames[0].it;
|
|
logNode(it.nextNode());
|
|
logNode(it.nextNode());
|
|
logNode(it.nextNode());
|
|
logNode(it.nextNode());
|
|
logNode(it.nextNode());
|
|
logNode(it.previousNode());
|
|
}
|
|
</script>
|
|
<iframe onload="runTest();" src="resources/node-iterator-prototype-frame.html"></iframe>
|
|
</body>
|
|
</html>
|