| Index: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
|
| index 0d60f06e15d275e47b1b2c16f92ff06bc708d5fc..98c642bcf264747a453b5fb67c529341d7af659a 100644
|
| --- a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
|
| @@ -110,6 +110,45 @@ test_with_window(function (contentWindow, contentDocument) {
|
| assert_array_equals(element.takeLog().types(), ['connected']);
|
| }, 'body on Document must enqueue connectedCallback when inserting a custom element');
|
|
|
| +test_with_window(function (contentWindow, contentDocument) {
|
| + const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
|
| + contentDocument.body.innerHTML = '<custom-element></custom-element>';
|
| + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
|
| +
|
| + contentDocument.open();
|
| + assert_array_equals(element.takeLog().types(), ['disconnected']);
|
| +}, 'open on Document must enqueue disconnectedCallback when removing a custom element');
|
| +
|
| +test_with_window(function (contentWindow, contentDocument) {
|
| + const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
|
| + contentDocument.body.innerHTML = '<custom-element></custom-element>';
|
| + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
|
| +
|
| + contentDocument.write('');
|
| + assert_array_equals(element.takeLog().types(), ['disconnected']);
|
| +}, 'write on Document must enqueue disconnectedCallback when removing a custom element');
|
| +
|
| +test_with_window(function (contentWindow, contentDocument) {
|
| + const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
|
| + contentWindow.document.write('<custom-element></custom-element>');
|
| + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
|
| +}, 'write on Document must enqueue connectedCallback after constructing a custom element');
|
| +
|
| +test_with_window(function (contentWindow, contentDocument) {
|
| + const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
|
| + contentDocument.body.innerHTML = '<custom-element></custom-element>';
|
| + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
|
| +
|
| + contentDocument.writeln('');
|
| + assert_array_equals(element.takeLog().types(), ['disconnected']);
|
| +}, 'writeln on Document must enqueue disconnectedCallback when removing a custom element');
|
| +
|
| +test_with_window(function (contentWindow) {
|
| + const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
|
| + contentWindow.document.writeln('<custom-element></custom-element>');
|
| + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
|
| +}, 'writeln on Document must enqueue connectedCallback after constructing a custom element');
|
| +
|
| </script>
|
| </body>
|
| </html>
|
|
|