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

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

Issue 117313008: Update Custom Elements API to new names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update for forgotten tests. Created 7 years 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
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;
11 } 11 }
12 12
13 document.register("x-foo", { prototype: Object.create(HTMLElement.prototype, { c reatedCallback: { value: markingReadyCallback } }) }); 13 document.registerElement("x-foo", { prototype: Object.create(HTMLElement.prototy pe, { createdCallback: { value: markingReadyCallback } }) });
14 document.register("x-bar", { extends: "div", prototype: Object.create(HTMLDivEle ment.prototype, { createdCallback: { value: markingReadyCallback } }) }); 14 document.registerElement("x-bar", { extends: "div", prototype: Object.create(HTM LDivElement.prototype, { createdCallback: { value: markingReadyCallback } }) });
15 </script> 15 </script>
16 </head> 16 </head>
17 <body> 17 <body>
18 <div id="container"></div> 18 <div id="container"></div>
19 <div id="host"></div> 19 <div id="host"></div>
20 20
21 <script> 21 <script>
22 22
23 shouldBeTrue("document.createElement('x-foo').callbacksCalled"); 23 shouldBeTrue("document.createElement('x-foo').callbacksCalled");
24 shouldBeTrue("document.createElement('div', 'x-bar').callbacksCalled"); 24 shouldBeTrue("document.createElement('div', 'x-bar').callbacksCalled");
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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

Powered by Google App Engine
This is Rietveld 408576698