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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/parser/foster-parent-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <script src="../../resources/js-test.js"></script>
2 <body>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
6 </script>
7 2
8 <div id="div"> 3 <div id="div">
9 <table id="table"> 4 <table id="table">
10 <script> 5 <script>
11 var table = document.getElementById('table'); 6 var table = document.getElementById('table');
12 table.parentNode.removeChild(table); 7 table.parentNode.removeChild(table);
13 var docFragment = document.createDocumentFragment(); 8 var docFragment = document.createDocumentFragment();
14 docFragment.appendChild(table); 9 docFragment.appendChild(table);
15 </script> 10 </script>
16 <h1 id="h1">Otherwise, if there is a table element in the stack of open elem ents, 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 elemen t before the last table element in the stack of open elements.</h1> 11 <h1></h1>
17 </table> 12 </table>
18 </div> 13 </div>
19 14
20 <script> 15 <script>
16 description("Tests the HTML foster parenting algorithm when a DocumentFragment i s the chosen foster parent");
21 var div = document.getElementById('div'); 17 var div = document.getElementById('div');
22 var h1 = document.getElementById('h1');
23 18
24 if (h1 && h1 === div.firstElementChild) 19 shouldBe("div.children.length", "0");
25 document.write("success"); 20 shouldBe("docFragment.firstElementChild.tagName", "'H1'");
26 else
27 document.write("failure");
28 </script> 21 </script>
29 </body>
30 </html>
OLDNEW
« 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