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

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html

Issue 2252003002: Change custom element state in documents without browsing context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html
diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html b/third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html
index b2cd70c290c1b2a90020677c309c61dd7a83df8e..9d3d2f1ed32ec633a3b63d67aadc05c0d92ee48a 100644
--- a/third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html
+++ b/third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html
@@ -30,8 +30,9 @@ iframe.onload = () => {
// Test DOM createElement() methods.
test_defined_for_createElement(data.defined, doc, data.tag_name);
- // Documents without browsing context should be "uncustomized"; i.e., "defined".
- test_defined_for_createElement(true, doc_without_browsing_context, data.tag_name, 'Without browsing context: ');
+ // Documents without browsing context should behave the same.
+ // They used to behave differently, but the spec changed in https://github.com/whatwg/dom/pull/291
dominicc (has gone to gerrit) 2016/08/18 04:58:38 Delete this line. Maybe just mentioning that PR in
+ test_defined_for_createElement(data.defined, doc_without_browsing_context, data.tag_name, 'Without browsing context: ');
}
done();
@@ -54,7 +55,7 @@ function test_defined_for_createElement(defined, doc, tag_name, description = ''
test_defined(true, svg_element, `${description}createElementNS("http://www.w3.org/2000/svg", "${tag_name}")`);
// Test ":defined" changes when the custom element was defined.
- if (!defined) {
+ if (!defined && doc.defaultView) {
dominicc (has gone to gerrit) 2016/08/18 04:58:38 I think these tests would be clearer without this
kojii 2016/08/18 05:26:47 Made whether to test value change or not explicit.
let w = doc.defaultView;
w.customElements.define(tag_name, class extends w.HTMLElement {
constructor() { super(); }

Powered by Google App Engine
This is Rietveld 408576698