Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / custom / lifecycle-created-paste.html
blobd26706f891d2c7b7b16d8cb7d3cb2caa1b176ae3
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script>
6 description("This test ensures that the lifecycle callbacks of editing-originated elements are visible in following script block.")
7 window.callbacksCalled = [];
8 document.registerElement("x-foo", { prototype: Object.create(HTMLElement.prototype, { createdCallback: { value: function() { window.callbacksCalled.push(this.tagName); } } }) });
9 document.registerElement("x-bar", { extends: "div", prototype: Object.create(HTMLDivElement.prototype, { createdCallback: { value: function() { window.callbacksCalled.push(this.tagName); } } }) });
10 </script>
11 </head>
12 <body>
13 <div id="container" contenteditable>[<x-foo>Foo</x-foo><div is='x-bar'>Bar</div>]</div>
14 <script>
15 var selection = window.getSelection();
17 selection.selectAllChildren(container);
18 document.execCommand("Copy");
20 shouldBe("window.callbacksCalled", "['X-FOO', 'DIV']");
21 selection.collapseToEnd();
22 document.execCommand("Paste");
23 shouldBe("window.callbacksCalled", "['X-FOO', 'DIV', 'X-FOO', 'DIV']");
25 container.style.display = "none";
26 </script>
27 </body>
28 </html>