Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html

Issue 2313573002: Custom Elements: add prototype check for "failed" elements (Closed)
Patch Set: template.html clean up Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-create.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..967763d696df5c4f803e41ddcfced768210d1577 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,17 @@
<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 doc = iframe.contentDocument;
+ let w = doc.defaultView;
let tmpl = doc.querySelector('#test');
let element = tmpl.content.querySelector('a-a');
+ w.customElements.define('a-a', class extends w.HTMLElement {});
test(function () {
- assert_false(element.matches(':defined'));
+ assert_true(element.matches(':not(:defined)'));
+ assert_true(element instanceof w.HTMLElement);
}, 'Custom element state in template content should be "not defined"');
done();
};
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-create.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698