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

Side by Side Diff: LayoutTests/fast/dom/document-importNode-arguments.html

Issue 371693002: Set default deep value false in Document.importNode (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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-importNode-arguments-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 <html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <p>This page tests calling document.importNode.</p> 6 <p>This page tests calling document.importNode.</p>
7 <div id='console'></div> 7 <div id='console'></div>
8 <script> 8 <script>
9 var imported; 9 var imported;
10 10
11 if (window.testRunner) 11 if (window.testRunner)
12 testRunner.dumpAsText(); 12 testRunner.dumpAsText();
13 13
14 var d = document.createElement("div"); 14 var d = document.createElement("div");
15 d.innerHTML = "<span>hello </span><span>world</span>"; 15 d.innerHTML = "<span>hello </span><span>world</span>";
16 16
17 imported = document.importNode(d); 17 imported = document.importNode(d);
18 shouldBe('imported.childNodes.length','2'); 18 shouldBe('imported.childNodes.length','0');
19 shouldBeTrue("imported.textContent == 'hello world'"); 19 shouldBeTrue("imported.textContent == ''");
20 20
21 imported = document.importNode(d, true); 21 imported = document.importNode(d, true);
22 shouldBe('imported.childNodes.length','2'); 22 shouldBe('imported.childNodes.length','2');
23 shouldBeTrue("imported.textContent == 'hello world'"); 23 shouldBeTrue("imported.textContent == 'hello world'");
24 24
25 imported = document.importNode(d, false); 25 imported = document.importNode(d, false);
26 shouldBe('imported.childNodes.length','0'); 26 shouldBe('imported.childNodes.length','0');
27 shouldBeTrue("imported.textContent == ''"); 27 shouldBeTrue("imported.textContent == ''");
28 28
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-importNode-arguments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698