Bug 1585809 [wpt PR 19479] - Use static getter to define disabledFeatures, a=testonly
authorRyosuke Niwa <rniwa@webkit.org>
Mon, 07 Oct 2019 22:05:07 +0000
changeset 497545 0ece6421f4d6ac88996389ed75ef53004cc4c6ef
parent 497544 ebe094b29bc2f382f375995c0d9a67e5f26b16ba
child 497546 9be020101a35b8094b9a89acce5379fa3739442f
push id36692
push userdvarga@mozilla.com
push dateTue, 15 Oct 2019 10:58:25 +0000
treeherdermozilla-central@dcedbb1d3fd9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1585809, 19479
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1585809 [wpt PR 19479] - Use static getter to define disabledFeatures, a=testonly Automatic update from web-platform-tests shadow-dom: Use static getter to define disabledFeatures (#19479) This allows shadow-dom/Element-interface-attachShadow-custom-element.html to run in Safari (it currently fails). -- wpt-commits: beca8464a59440d44a41edbba1989e8d6dc2a38e wpt-pr: 19479
testing/web-platform/tests/shadow-dom/Element-interface-attachShadow-custom-element.html
--- a/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow-custom-element.html
+++ b/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow-custom-element.html
@@ -15,17 +15,17 @@ test(() => {
 }, 'Element.attachShadow must create an instance of ShadowRoot for autonomous custom elements');
 
 test(() => {
   assert_true(document.createElement('undefined-custom').attachShadow({mode: 'open'}) instanceof ShadowRoot);
 }, 'Element.attachShadow must create an instance of ShadowRoot for undefined autonomous custom elements');
 
 test(() => {
   class ShadowDisabledElement extends HTMLElement {
-    static disabledFeatures = ['shadow'];
+    static get disabledFeatures() { return ['shadow']; }
   }
 
   // No definition. attachShadow() should succeed.
   let element = document.createElement('shadow-disabled-element');
   element.attachShadow({mode: 'closed'});
 
   // No definition and it's already a host.
   assert_throws('NotSupportedError', () => {
@@ -42,17 +42,17 @@ test(() => {
   assert_throws('NotSupportedError', () => {
     document.createElement('shadow-disabled-element').attachShadow({mode: 'closed'});
   }, 'Definition, not a host');
 }, 'Element.attachShadow for an autonomous custom element with ' +
    'disabledFeatures=["shadow"] should throw a NotSupportedError');
 
 test(() => {
   class ShadowDisabledHeadingElement extends HTMLHeadingElement {
-    static disabledFeatures = ['shadow'];
+    static get disabledFeatures() { return ['shadow']; }
   }
 
   // No definition. attachShadow() should succeed.
   let element = document.createElement('h2',
       {is: 'shadow-disabled-heading-element'});
   element.attachShadow({mode: 'closed'});
 
   // No definition and it's already a host.
@@ -72,17 +72,17 @@ test(() => {
   assert_throws('NotSupportedError', () => {
     h2.attachShadow({mode: 'closed'});
   }, 'Definition, not a host');
 }, 'Element.attachShadow for a customized built-in element with ' +
    'disabledFeatures=["shadow"] should throw a NotSupportedError');
 
 test(() => {
   class CapitalShadowDisabledElement extends HTMLElement {
-    static disabledFeatures = ['SHADOW'];
+    static get disabledFeatures() { return ['shadow']; }
   }
 
   customElements.define('capital-shadow-disabled-element', CapitalShadowDisabledElement);
 
   // Test fails if this throws
   document.createElement('capital-shadow-disabled-element').attachShadow({mode: 'open'});
 }, 'Element.attachShadow for a custom element with disabledFeatures=["SHADOW"] should not throw a NotSupportedError');