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

Side by Side Diff: LayoutTests/fast/dom/implementation-createHTMLDocument.html

Issue 366883003: Make DOMImplementation.createHTMLDocument implementation more spec aligned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take review comment into consideration Created 6 years, 5 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 function print(message, color) 4 function print(message, color)
5 { 5 {
6 var paragraph = document.createElement("div"); 6 var paragraph = document.createElement("div");
7 paragraph.appendChild(document.createTextNode(message)); 7 paragraph.appendChild(document.createTextNode(message));
8 paragraph.style.fontFamily = "monospace"; 8 paragraph.style.fontFamily = "monospace";
9 if (color) 9 if (color)
10 paragraph.style.color = color; 10 paragraph.style.color = color;
(...skipping 24 matching lines...) Expand all
35 doc = document.implementation.createHTMLDocument("title"); 35 doc = document.implementation.createHTMLDocument("title");
36 shouldBe("doc.title", "title"); 36 shouldBe("doc.title", "title");
37 shouldBe("doc.getElementsByTagName('html').length", 1); 37 shouldBe("doc.getElementsByTagName('html').length", 1);
38 shouldBe("doc.getElementsByTagName('head').length", 1); 38 shouldBe("doc.getElementsByTagName('head').length", 1);
39 shouldBe("doc.getElementsByTagName('title').length", 1); 39 shouldBe("doc.getElementsByTagName('title').length", 1);
40 shouldBe("doc.getElementsByTagName('body').length", 1); 40 shouldBe("doc.getElementsByTagName('body').length", 1);
41 41
42 print("[document with title '']"); 42 print("[document with title '']");
43 doc = document.implementation.createHTMLDocument(""); 43 doc = document.implementation.createHTMLDocument("");
44 shouldBe("doc.title", ""); 44 shouldBe("doc.title", "");
45 shouldBe("doc.getElementsByTagName('title').item(0).firstChild.data", "");
45 46
46 print("[document with null title]"); 47 print("[document with null title]");
47 doc = document.implementation.createHTMLDocument(null); 48 doc = document.implementation.createHTMLDocument(null);
48 shouldBe("doc.title", "null"); 49 shouldBe("doc.title", "null");
49 } 50 }
50 </script> 51 </script>
51 </head> 52 </head>
52 53
53 <body onload="test();"> 54 <body onload="test();">
54 <p>This page tests the DOM createHTMLDocument method.</p> 55 <p>This page tests the DOM createHTMLDocument method.</p>
55 <p>If the test passes, you'll see a series of 'PASS' messages below.</p> 56 <p>If the test passes, you'll see a series of 'PASS' messages below.</p>
56 <hr> 57 <hr>
57 58
58 <div id='console'></div> 59 <div id='console'></div>
59 60
60 </body> 61 </body>
61 </html> 62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698