Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: LayoutTests/fast/parser/foster-parent.html

Issue 640433002: Update HTML parser's foster-parenting algorithm to match the current spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/parser/foster-parent-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/parser/foster-parent.html
diff --git a/LayoutTests/fast/parser/foster-parent.html b/LayoutTests/fast/parser/foster-parent.html
index ce555b34c7d39cd83ea21170919b66fa5d930804..65195d9f0f296dfd0d276242d4008f30d9e88f83 100644
--- a/LayoutTests/fast/parser/foster-parent.html
+++ b/LayoutTests/fast/parser/foster-parent.html
@@ -1,9 +1,4 @@
-<html>
-<body>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-</script>
+<script src="../../resources/js-test.js"></script>
<div id="div">
<table id="table">
@@ -13,18 +8,14 @@ if (window.testRunner)
var docFragment = document.createDocumentFragment();
docFragment.appendChild(table);
</script>
- <h1 id="h1">Otherwise, if there is a table element in the stack of open elements, but the last table element in the stack of open elements has no parent, or its parent node is not an element, then the foster parent element is the element before the last table element in the stack of open elements.</h1>
+ <h1></h1>
</table>
</div>
<script>
+description("Tests the HTML foster parenting algorithm when a DocumentFragment is the chosen foster parent");
var div = document.getElementById('div');
-var h1 = document.getElementById('h1');
-if (h1 && h1 === div.firstElementChild)
- document.write("success");
-else
- document.write("failure");
+shouldBe("div.children.length", "0");
+shouldBe("docFragment.firstElementChild.tagName", "'H1'");
</script>
-</body>
-</html>
« no previous file with comments | « no previous file | LayoutTests/fast/parser/foster-parent-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698