| Index: third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
|
| diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html b/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
|
| index 995ee272ea2a87d5ddfcf3a51a08282c01718bd2..fff117f7b99ae8ba6e90bcedcaa0faa57e1e16cf 100644
|
| --- a/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
|
| +++ b/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
|
| @@ -21,6 +21,8 @@ test_with_window(w => {
|
| throw new Error();
|
| }
|
| connectedCallback() {
|
| + // TODO(davaajav): remove the failure expectation when this issue is closed
|
| + // https://github.com/w3c/webcomponents/issues/563
|
| assert_unreached('connectedCallback should not be invoked if constructor threw');
|
| }
|
| });
|
| @@ -36,6 +38,15 @@ test_with_window(w => {
|
| // "failed" is not "defined"
|
| // https://dom.spec.whatwg.org/#concept-element-defined
|
| assert_false(element.matches(':defined'));
|
| +
|
| + // "failed" element should implement HTMLUnknownElement only in "creating an element for a token"
|
| + // https://html.spec.whatwg.org/#create-an-element-for-the-token
|
| + assert_equals(Object.getPrototypeOf(element), w.HTMLElement.prototype);
|
| +
|
| + // 2. If element's custom element state is "failed", then abort these steps.
|
| + // https://html.spec.whatwg.org/multipage/scripting.html#upgrades
|
| + container.appendChild(element);
|
| + assert_equals(constructorCount, 1, 'constructor should be invoked once');
|
| });
|
| </script>
|
| </body>
|
|
|