Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / custom / lifecycle-created-createElement-reentrancy.html
blobc9620fa716464c6c93a46af834e1a0c51400c381
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 callback of a parser-made element is visible in following script block.")
8 window.callbacksCalled = [];
10 function fooCreatedFunction() {
11 shouldBe("window.callbacksCalled", "[]");
12 window.callbacksCalled.push(this.tagName);
13 this.innerHTML = "<x-bar></x-bar>";
14 shouldBe("window.callbacksCalled", "['X-FOO', 'X-BAR']");
17 function barCreatedFunction() {
18 shouldBe("window.callbacksCalled", "['X-FOO']");
19 window.callbacksCalled.push(this.tagName);
22 document.registerElement("x-foo", { prototype: Object.create(HTMLElement.prototype, { createdCallback: { value: fooCreatedFunction } }) });
23 document.registerElement("x-bar", { prototype: Object.create(HTMLElement.prototype, { createdCallback: { value: barCreatedFunction } }) });
24 </script>
25 </head>
26 <body>
27 <script>
28 document.createElement("x-foo");
29 shouldBe("window.callbacksCalled", "['X-FOO', 'X-BAR']");
30 </script>
31 </body>
32 </html>