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

Side by Side Diff: LayoutTests/fast/parser/append-child-followed-by-document-write.html

Issue 1163863005: Check documentElement conditions in parser* DOM mutation methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add the test again. Created 5 years, 6 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/append-child-followed-by-document-write-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 <script> 1 <script>
2 function go() { 2 function go() {
3 document.open(); 3 document.open();
4 var a = document.createElement("a"); 4 var a = document.createElement("a");
5 document.appendChild(a); 5 document.appendChild(a);
6 document.write("<b id='b'></b>"); 6 document.write("<b id='b'></b>");
7 var b = document.getElementById('b'); 7 var b = document.getElementById('b');
8 8
9 // Ideally we would use the dump-as-markup test framework for this test, but 9 // Ideally we would use the dump-as-markup test framework for this test, but
10 // the contortions we go through here are too tricky for dump-as-markup. 10 // the contortions we go through here are too tricky for dump-as-markup.
11 11 // TODO(esprehn): Is this really true?
12 var firstChildHTML = document.firstChild.outerHTML; 12 alert("document.documentElement.outerHTML: " + document.documentElement.outerH TML + "\n" +
13 var secondChildHTML = document.firstChild.nextSibling.outerHTML; 13 "document.childNodes.length: " + document.childNodes.length + "\n" +
14 14 "b element: " + b + "\n");
15 alert("document.firstChild.outerHTML: " + firstChildHTML + "\n" +
16 "document.firstChild.nextSibling.outerHTML: " + secondChildHTML);
17 } 15 }
18 16
19 window.addEventListener("load", go, false); 17 window.addEventListener("load", go, false);
20 18
21 if (window.testRunner) 19 if (window.testRunner)
22 testRunner.dumpAsText(); 20 testRunner.dumpAsText();
23 </script> 21 </script>
24 This test covers some tricky ground where we call appendChild between 22 This test covers some tricky ground where we call appendChild between
25 document.open an document.write. This sequence of calls results in an unusual 23 document.open an document.write. This sequence of calls results in an unusual
26 situation where the parser is in the Initial state but the document is not 24 situation where the parser is in the Initial state but the document is not
27 empty. 25 empty.
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/parser/append-child-followed-by-document-write-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698