Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html |
| diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html b/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html |
| index 89bd75c3ccfec5e8144d92cce66016fbcef2d0e4..d43c2eb09e3a38c1cdbf09b110e3df36b0e43358 100644 |
| --- a/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html |
| +++ b/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html |
| @@ -8,15 +8,24 @@ |
| <script> |
| 'use strict'; |
| -// Setup iframe to test the parser. |
| -iframe.srcdoc = `<template id="test"><a-a>innerHTML</a-a></template>`; |
| +iframe.srcdoc = `<template id="test"><a-a></a-a></template>`; |
| setup({ explicit_done: true }); |
| iframe.onload = () => { |
| + let logs = []; |
| let doc = iframe.contentDocument; |
| + let w = doc.defaultView; |
| let tmpl = doc.querySelector('#test'); |
| let element = tmpl.content.querySelector('a-a'); |
| + console.log(element + ''); |
|
kojii
2016/09/06 08:10:55
Please remove this one too.
|
| + w.customElements.define('a-a', class extends w.HTMLElement { |
| + constructor() { super(); logs.push('construct'); } |
| + connectedCallback() { logs.push('connected'); } |
| + } |
| + ); |
| test(function () { |
| - assert_false(element.matches(':defined')); |
| + assert_true(element.matches(':not(:defined)')); |
| + assert_true(element instanceof w.HTMLElement); |
| + logs.push('test'); |
| }, 'Custom element state in template content should be "not defined"'); |
| done(); |
| }; |