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

Side by Side Diff: LayoutTests/fast/dom/custom/lifecycle-created-paste.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 editing-originate d elements are visible in following script block.") 6 description("This test ensures that the lifecycle callbacks of editing-originate d elements are visible in following script block.")
7 window.callbacksCalled = []; 7 window.callbacksCalled = [];
8 document.register("x-foo", { prototype: Object.create(HTMLElement.prototype, { c reatedCallback: { value: function() { window.callbacksCalled.push(this.tagName); } } }) }); 8 document.registerElement("x-foo", { prototype: Object.create(HTMLElement.prototy pe, { createdCallback: { value: function() { window.callbacksCalled.push(this.ta gName); } } }) });
9 document.register("x-bar", { extends: "div", prototype: Object.create(HTMLDivEle ment.prototype, { createdCallback: { value: function() { window.callbacksCalled. push(this.tagName); } } }) }); 9 document.registerElement("x-bar", { extends: "div", prototype: Object.create(HTM LDivElement.prototype, { createdCallback: { value: function() { window.callbacks Called.push(this.tagName); } } }) });
10 </script> 10 </script>
11 </head> 11 </head>
12 <body> 12 <body>
13 <div id="container" contenteditable>[<x-foo>Foo</x-foo><div is='x-bar'>Bar</div> ]</div> 13 <div id="container" contenteditable>[<x-foo>Foo</x-foo><div is='x-bar'>Bar</div> ]</div>
14 <script> 14 <script>
15 var selection = window.getSelection(); 15 var selection = window.getSelection();
16 16
17 selection.selectAllChildren(container); 17 selection.selectAllChildren(container);
18 document.execCommand("Copy"); 18 document.execCommand("Copy");
19 19
20 shouldBe("window.callbacksCalled", "['X-FOO', 'DIV']"); 20 shouldBe("window.callbacksCalled", "['X-FOO', 'DIV']");
21 selection.collapseToEnd(); 21 selection.collapseToEnd();
22 document.execCommand("Paste"); 22 document.execCommand("Paste");
23 shouldBe("window.callbacksCalled", "['X-FOO', 'DIV', 'X-FOO', 'DIV']"); 23 shouldBe("window.callbacksCalled", "['X-FOO', 'DIV', 'X-FOO', 'DIV']");
24 24
25 container.style.display = "none"; 25 container.style.display = "none";
26 </script> 26 </script>
27 </body> 27 </body>
28 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698