OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 <script src="../../js/resources/js-test-post.js"></script> | |
73 </body> | 72 </body> |
74 </html> | 73 </html> |
OLD | NEW |