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

Side by Side Diff: LayoutTests/fast/dom/custom/lifecycle-created-creation-api.html

Issue 252713004: Make default for deep parameter in importNode false (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT Created 6 years, 7 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 description("This test ensures that the lifecycle callbacks of API-originated el ements are visible in following script block.") 6 description("This test ensures that the lifecycle callbacks of API-originated el ements are visible in following script block.")
7 window.callbacksCalled = []; 7 window.callbacksCalled = [];
8 function markingReadyCallback() { 8 function markingReadyCallback() {
9 window.callbacksCalled.push(this.tagName); 9 window.callbacksCalled.push(this.tagName);
10 this.callbacksCalled = true; 10 this.callbacksCalled = true;
(...skipping 24 matching lines...) Expand all
35 bar.appendChild(document.createElement('x-foo')); 35 bar.appendChild(document.createElement('x-foo'));
36 shouldBeTrue("bar.cloneNode().callbacksCalled"); 36 shouldBeTrue("bar.cloneNode().callbacksCalled");
37 shouldBeTrue("bar.cloneNode(true).firstChild.callbacksCalled"); 37 shouldBeTrue("bar.cloneNode(true).firstChild.callbacksCalled");
38 38
39 var foreignDoc = document.implementation.createDocument('http://www.w3.org/1999/ xhtml', 'html', null); 39 var foreignDoc = document.implementation.createDocument('http://www.w3.org/1999/ xhtml', 'html', null);
40 40
41 var foreignFoo = foreignDoc.createElement('x-foo'); 41 var foreignFoo = foreignDoc.createElement('x-foo');
42 foreignFoo.appendChild(foreignDoc.createElement('div', 'x-bar')); 42 foreignFoo.appendChild(foreignDoc.createElement('div', 'x-bar'));
43 shouldBeTrue("foreignFoo.callbacksCalled"); 43 shouldBeTrue("foreignFoo.callbacksCalled");
44 shouldBeTrue("foreignFoo.firstChild.callbacksCalled"); 44 shouldBeTrue("foreignFoo.firstChild.callbacksCalled");
45 importedFoo = document.importNode(foreignFoo) 45 importedFoo = document.importNode(foreignFoo, true)
46 shouldBeTrue("importedFoo.callbacksCalled"); 46 shouldBeTrue("importedFoo.callbacksCalled");
47 shouldBeTrue("importedFoo.firstChild.callbacksCalled"); 47 shouldBeTrue("importedFoo.firstChild.callbacksCalled");
48 48
49 window.callbacksCalled = []; 49 window.callbacksCalled = [];
50 var foreignBar = foreignDoc.createElement('div', 'x-bar'); 50 var foreignBar = foreignDoc.createElement('div', 'x-bar');
51 foreignBar.appendChild(foreignDoc.createElement('x-foo')); 51 foreignBar.appendChild(foreignDoc.createElement('x-foo'));
52 shouldBe("window.callbacksCalled", "['div', 'x-foo']"); 52 shouldBe("window.callbacksCalled", "['div', 'x-foo']");
53 window.callbacksCalled = []; 53 window.callbacksCalled = [];
54 importedBar = document.importNode(foreignBar); 54 importedBar = document.importNode(foreignBar, true);
55 shouldBeTrue("importedBar.callbacksCalled"); 55 shouldBeTrue("importedBar.callbacksCalled");
56 shouldBeTrue("importedBar.firstChild.callbacksCalled"); 56 shouldBeTrue("importedBar.firstChild.callbacksCalled");
57 shouldBe("window.callbacksCalled", "['DIV', 'X-FOO']"); 57 shouldBe("window.callbacksCalled", "['DIV', 'X-FOO']");
58 58
59 window.callbacksCalled = []; 59 window.callbacksCalled = [];
60 var toBeReplaced = document.createElement("div"); 60 var toBeReplaced = document.createElement("div");
61 document.body.appendChild(toBeReplaced); 61 document.body.appendChild(toBeReplaced);
62 toBeReplaced.outerHTML = "<x-foo></x-foo>"; 62 toBeReplaced.outerHTML = "<x-foo></x-foo>";
63 shouldBe("window.callbacksCalled", "['X-FOO']"); 63 shouldBe("window.callbacksCalled", "['X-FOO']");
64 64
65 window.callbacksCalled = []; 65 window.callbacksCalled = [];
66 var insertionPlaceHolder = document.createElement("div"); 66 var insertionPlaceHolder = document.createElement("div");
67 document.body.appendChild(insertionPlaceHolder); 67 document.body.appendChild(insertionPlaceHolder);
68 insertionPlaceHolder.insertAdjacentHTML("beforebegin", "<x-foo></x-foo>"); 68 insertionPlaceHolder.insertAdjacentHTML("beforebegin", "<x-foo></x-foo>");
69 shouldBe("window.callbacksCalled", "['X-FOO']"); 69 shouldBe("window.callbacksCalled", "['X-FOO']");
70 70
71 </script> 71 </script>
72 </body> 72 </body>
73 </html> 73 </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