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(); } |