| Index: third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
|
| diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html b/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
|
| index 4d33bb67af06833951a209564bce7701386b520a..4bae58660fdde158d4eb8bd91e59260d09da23be 100644
|
| --- a/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
|
| +++ b/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
|
| @@ -122,11 +122,31 @@ test_with_window((w) => {
|
| }
|
| }
|
| w.customElements.define('a-a', A);
|
| + let e = w.document.createElement('a-a');
|
| + assert_true(e.matches(':defined'),
|
| + 'constructing an autonomous custom element with create element should ' +
|
| + 'not throw InvalidStateError ' +
|
| + 'and should return a "custom" element');
|
| +}, 'Already constructed marker, create element');
|
| +
|
| +test_with_window((w) => {
|
| + let flag = true;
|
| + class A extends w.HTMLElement {
|
| + constructor() {
|
| + if (flag) {
|
| + flag = false;
|
| + new A();
|
| + }
|
| + super();
|
| + }
|
| + }
|
| + w.customElements.define('a-a', A);
|
| + let d = w.document.createElement('div');
|
| assert_reports(w, 'INVALID_STATE_ERR', () => {
|
| - w.document.createElement('a-a');
|
| + d.innerHTML = '<a-a>';
|
| }, 'Creating an element that is already constructed marker should report ' +
|
| 'InvalidStateError');
|
| -}, 'Already constructed marker, create element');
|
| +}, 'Already constructed marker, fragment parsing should set marker');
|
|
|
| test_with_window((w) => {
|
| let errors = [];
|
|
|