Bug 1374872 - Disable tests involving web components for stylo. r?wchen draft
authorXidorn Quan <me@upsuper.org>
Wed, 21 Jun 2017 14:51:37 +1000
changeset 614914 4f2f9945240e9f4e20cd2824c312c0e7da91e233
parent 614766 cd4897b32c1e5723c347dec5aa44133ca36c4dbb
child 639008 841816c416f27acc354f3d1a9d3b368810d15b11
push id70170
push userxquan@mozilla.com
push dateTue, 25 Jul 2017 06:08:35 +0000
reviewerswchen
bugs1374872
milestone56.0a1
Bug 1374872 - Disable tests involving web components for stylo. r?wchen MozReview-Commit-ID: JWA210RkpAW
accessible/tests/mochitest/elm/a11y.ini
dom/base/test/mochitest.ini
dom/base/test/test_mutationobservers.html
dom/events/test/mochitest.ini
dom/tests/mochitest/general/test_interfaces.js
dom/tests/mochitest/webcomponents/mochitest.ini
layout/inspector/tests/test_bug522601.xhtml
--- a/accessible/tests/mochitest/elm/a11y.ini
+++ b/accessible/tests/mochitest/elm/a11y.ini
@@ -9,8 +9,9 @@ skip-if = buildapp == 'mulet'
 [test_figure.html]
 [test_listbox.xul]
 [test_MathMLSpec.html]
 [test_nsApplicationAcc.html]
 [test_plugin.html]
 skip-if = buildapp == 'mulet'
 [test_canvas.html]
 [test_shadowroot.html]
+skip-if = stylo # bug 1293844
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -582,17 +582,19 @@ skip-if = toolkit == 'android' #bug 6870
 [test_bug922681.html]
 [test_bug927196.html]
 [test_bug962251.html]
 [test_bug976673.html]
 [test_bug982153.html]
 [test_bug999456.html]
 [test_bug1022229.html]
 [test_bug1025933.html]
+skip-if = stylo # bug 1293844
 [test_bug1037687.html]
+skip-if = stylo # bug 1293844
 [test_bug1043106.html]
 [test_bug1057176.html]
 [test_bug1060938.html]
 [test_bug1064481.html]
 [test_bug1070015.html]
 [test_bug1075702.html]
 [test_bug1081686.html]
 skip-if = toolkit == 'android'
--- a/dom/base/test/test_mutationobservers.html
+++ b/dom/base/test/test_mutationobservers.html
@@ -601,16 +601,22 @@ function testExpandos() {
     SpecialPowers.gc();
     SpecialPowers.gc();
     SpecialPowers.gc();
   }
   div.setAttribute("foo", "bar2");
 }
 
 function testOutsideShadowDOM() {
+  if (!div.createShadowRoot) {
+    todo(false, "Skipping testOutsideShadowDOM and testInsideShadowDOM " +
+         "because createShadowRoot is not supported");
+    then(testMarquee);
+    return;
+  }
   var m = new M(function(records, observer) {
     is(records.length, 1);
     is(records[0].type, "attributes", "Should have got attributes");
     observer.disconnect();
     then(testInsideShadowDOM);
   });
   m.observe(div, {
       attributes: true,
--- a/dom/events/test/mochitest.ini
+++ b/dom/events/test/mochitest.ini
@@ -131,21 +131,24 @@ skip-if = (e10s && os == "mac") # bug 12
 [test_bug1003432.html]
 support-files = test_bug1003432.js
 [test_bug1013412.html]
 [test_bug1017086_disable.html]
 support-files = bug1017086_inner.html
 [test_bug1017086_enable.html]
 support-files = bug1017086_inner.html
 [test_bug1079236.html]
+skip-if = stylo # bug 1293844
 [test_bug1145910.html]
+skip-if = stylo # bug 1293844
 [test_bug1150308.html]
+skip-if = stylo # bug 1293844
 [test_bug1248459.html]
 [test_bug1264380.html]
-run-if = (e10s && os != "win") # Bug 1270043, crash at windows platforms; Bug1264380 comment 20, nsDragService::InvokeDragSessionImpl behaves differently among platform implementations in non-e10s mode which prevents us to check the validity of nsIDragService::getCurrentSession() consistently via synthesize mouse clicks in non-e10s mode.
+run-if = (e10s && os != "win" && !stylo) # Bug 1270043, crash at windows platforms; Bug1264380 comment 20, nsDragService::InvokeDragSessionImpl behaves differently among platform implementations in non-e10s mode which prevents us to check the validity of nsIDragService::getCurrentSession() consistently via synthesize mouse clicks in non-e10s mode. bug 1293844 for stylo.
 [test_bug1327798.html]
 subsuite = clipboard
 [test_clickevent_on_input.html]
 skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
 [test_continuous_wheel_events.html]
 [test_dblclick_explicit_original_target.html]
 [test_dom_activate_event.html]
 [test_dom_keyboard_event.html]
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -407,17 +407,17 @@ var interfaceNamesInGlobalScope =
     "HTMLBRElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLButtonElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLCanvasElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLCollection",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "HTMLContentElement",
+    {name: "HTMLContentElement", stylo: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLDataElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLDataListElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLDetailsElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "HTMLDialogElement", disabled: true},
@@ -505,17 +505,17 @@ var interfaceNamesInGlobalScope =
     "HTMLProgressElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLQuoteElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLScriptElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLSelectElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "HTMLShadowElement",
+    {name: "HTMLShadowElement", stylo: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLSourceElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLSpanElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLStyleElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLTableCaptionElement",
@@ -835,17 +835,17 @@ var interfaceNamesInGlobalScope =
     "ServiceWorkerContainer",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorkerRegistration",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "ScopedCredential", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "ScopedCredentialInfo", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "ShadowRoot", // Bogus, but the test harness forces it on.  See bug 1159768.
+    {name: "ShadowRoot", stylo: false}, // Bogus, but the test harness forces it on.  See bug 1159768.
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SharedWorker",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "SimpleGestureEvent", xbl: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "SimpleTest", xbl: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SourceBuffer",
@@ -1291,16 +1291,17 @@ function createInterfaceMap(isXBLScope) 
   var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
   var isNightly = version.endsWith("a1");
   var isRelease = !version.includes("a");
   var isDesktop = !/Mobile|Tablet/.test(navigator.userAgent);
   var isMac = /Mac OS/.test(navigator.oscpu);
   var isWindows = /Windows/.test(navigator.oscpu);
   var isAndroid = navigator.userAgent.includes("Android");
   var isLinux = /Linux/.test(navigator.oscpu) && !isAndroid;
+  var isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo;
   var isSecureContext = window.isSecureContext;
 
   var interfaceMap = {};
 
   function addInterfaces(interfaces)
   {
     for (var entry of interfaces) {
       if (typeof(entry) === "string") {
@@ -1311,16 +1312,17 @@ function createInterfaceMap(isXBLScope) 
             (entry.nightlyAndroid === !(isAndroid && isNightly) && isAndroid) ||
             (entry.xbl === !isXBLScope) ||
             (entry.desktop === !isDesktop) ||
             (entry.windows === !isWindows) ||
             (entry.releaseNonWindows === !isRelease && !isWindows) ||
             (entry.mac === !isMac) ||
             (entry.linux === !isLinux) ||
             (entry.android === !isAndroid && !entry.nightlyAndroid) ||
+            (entry.stylo === !isStylo) ||
             (entry.release === !isRelease) ||
             (entry.isSecureContext === !isSecureContext) ||
             entry.disabled) {
           interfaceMap[entry.name] = false;
         } else {
           interfaceMap[entry.name] = true;
         }
       }
--- a/dom/tests/mochitest/webcomponents/mochitest.ini
+++ b/dom/tests/mochitest/webcomponents/mochitest.ini
@@ -1,55 +1,78 @@
 [DEFAULT]
 support-files =
   inert_style.css
   dummy_page.html
 
 [test_bug900724.html]
 [test_bug1017896.html]
 [test_bug1176757.html]
+skip-if = stylo # bug 1293844
 [test_bug1276240.html]
 [test_content_element.html]
+skip-if = stylo # bug 1293844
 [test_custom_element_adopt_callbacks.html]
 [test_custom_element_callback_innerhtml.html]
 [test_custom_element_clone_callbacks.html]
 [test_custom_element_clone_callbacks_extended.html]
 [test_custom_element_htmlconstructor.html]
 skip-if = os == 'android' # bug 1323645
 support-files =
   htmlconstructor_autonomous_tests.js
   htmlconstructor_builtin_tests.js
 [test_custom_element_import_node_created_callback.html]
 [test_custom_element_in_shadow.html]
+skip-if = stylo # bug 1293844
 [test_custom_element_register_invalid_callbacks.html]
 [test_custom_element_get.html]
 [test_custom_element_when_defined.html]
 [test_nested_content_element.html]
+skip-if = stylo # bug 1293844
 [test_dest_insertion_points.html]
+skip-if = stylo # bug 1293844
 [test_dest_insertion_points_shadow.html]
+skip-if = stylo # bug 1293844
 [test_fallback_dest_insertion_points.html]
+skip-if = stylo # bug 1293844
 [test_detached_style.html]
+skip-if = stylo # bug 1293844
 [test_dynamic_content_element_matching.html]
+skip-if = stylo # bug 1293844
 [test_document_adoptnode.html]
+skip-if = stylo # bug 1293844
 [test_document_importnode.html]
+skip-if = stylo # bug 1293844
 [test_document_register.html]
 [test_document_register_base_queue.html]
 [test_document_register_lifecycle.html]
 [test_document_register_parser.html]
 [test_document_register_stack.html]
 [test_document_shared_registry.html]
 [test_event_dispatch.html]
+skip-if = stylo # bug 1293844
 [test_event_retarget.html]
+skip-if = stylo # bug 1293844
 [test_event_stopping.html]
+skip-if = stylo # bug 1293844
 [test_template.html]
 [test_template_xhtml.html]
 [test_template_custom_elements.html]
 [test_shadowroot.html]
+skip-if = stylo # bug 1293844
 [test_shadowroot_inert_element.html]
+skip-if = stylo # bug 1293844
 [test_shadowroot_host.html]
+skip-if = stylo # bug 1293844
 [test_shadowroot_style.html]
+skip-if = stylo # bug 1293844
 [test_shadowroot_style_multiple_shadow.html]
+skip-if = stylo # bug 1293844
 [test_shadowroot_style_order.html]
+skip-if = stylo # bug 1293844
 [test_shadowroot_youngershadowroot.html]
+skip-if = stylo # bug 1293844
 [test_style_fallback_content.html]
+skip-if = stylo # bug 1293844
 [test_unresolved_pseudo_class.html]
 [test_link_prefetch.html]
-[test_bug1269155.html]
\ No newline at end of file
+[test_bug1269155.html]
+skip-if = stylo # bug 1293844
--- a/layout/inspector/tests/test_bug522601.xhtml
+++ b/layout/inspector/tests/test_bug522601.xhtml
@@ -232,42 +232,44 @@ addLoadEvent(function() {
   testFunc(walkerAnon, "previousNode", $("s").nextSibling, "step back to more text (anon)");
   testFunc(walkerAnon, "previousNode", $("s").previousSibling,
            "step back to some text (anon)");
   testFunc(walkerAnon, "previousNode", anonDiv,
            "step back to anonymous div");
   testFunc(walkerAnon, "previousNode", $("display"), "step back to root (anon)");
   testFunc(walkerAnon, "previousNode", null, "step back past root (anon)");
 
-  var shadowdiv = document.querySelector('#test-shadow');
-  var shadowRoot = shadowdiv.createShadowRoot();
-  var h = document.createElement("header");
-  var c = document.createElement("content");
-  c.setAttribute("select", "h2");
-  h.appendChild(c);
-  shadowRoot.appendChild(h);
+  if (Element.prototype.createShadowRoot) {
+    var shadowdiv = document.querySelector('#test-shadow');
+    var shadowRoot = shadowdiv.createShadowRoot();
+    var h = document.createElement("header");
+    var c = document.createElement("content");
+    c.setAttribute("select", "h2");
+    h.appendChild(c);
+    shadowRoot.appendChild(h);
 
-  var walkerShadow =
-    SpecialPowers.Cc["@mozilla.org/inspector/deep-tree-walker;1"]
-                 .createInstance(SpecialPowers.Ci.inIDeepTreeWalker);
-  walkerShadow.showAnonymousContent = true;
-  walkerShadow.init($("test-shadow"), NodeFilter.SHOW_ALL);
-  var c1 = walkerShadow.nextNode();
-  var c2 = walkerShadow.nextNode();
-  var c3 = walkerShadow.nextNode();
+    var walkerShadow =
+        SpecialPowers.Cc["@mozilla.org/inspector/deep-tree-walker;1"]
+                     .createInstance(SpecialPowers.Ci.inIDeepTreeWalker);
+    walkerShadow.showAnonymousContent = true;
+    walkerShadow.init($("test-shadow"), NodeFilter.SHOW_ALL);
+    var c1 = walkerShadow.nextNode();
+    var c2 = walkerShadow.nextNode();
+    var c3 = walkerShadow.nextNode();
 
-  walkerShadow.currentNode = c1;
-  is(SpecialPowers.unwrap(walkerShadow.currentNode), h,
-     "Unexpected shadow element 1");
-  walkerShadow.currentNode = c2;
-  is(SpecialPowers.unwrap(walkerShadow.currentNode), $("h2"),
-     "Unexpected shadow element 2");
-  walkerShadow.currentNode = c3;
-  is(SpecialPowers.unwrap(walkerShadow.currentNode), $("h2").firstChild,
-     "Unexpected shadow element 3");
+    walkerShadow.currentNode = c1;
+    is(SpecialPowers.unwrap(walkerShadow.currentNode), h,
+       "Unexpected shadow element 1");
+    walkerShadow.currentNode = c2;
+    is(SpecialPowers.unwrap(walkerShadow.currentNode), $("h2"),
+       "Unexpected shadow element 2");
+    walkerShadow.currentNode = c3;
+    is(SpecialPowers.unwrap(walkerShadow.currentNode), $("h2").firstChild,
+       "Unexpected shadow element 3");
+  }
 
   SimpleTest.finish();
 });
 
 ]]>
 </script>
 </pre>
 </body>