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> |