Bug 1543575 - add fission coverage for accessibility b-c e10s caching tests. r=Jamie
☠☠ backed out by 078a8b562863 ☠ ☠
authorYura Zenevich <yura.zenevich@gmail.com>
Thu, 17 Oct 2019 15:15:09 +0000
changeset 559385 8b92e98ee616c5a0e9d33d91d4bab5ea3209fe45
parent 559384 d7d27d08162d32b6b1c8fd048f918b50d40eabd6
child 559386 2dbafadffbd9114592c927136992571d57b86bae
push id12177
push usercsabou@mozilla.com
push dateMon, 21 Oct 2019 14:52:16 +0000
treeherdermozilla-beta@1918a9cd33bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamie
bugs1543575
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 1543575 - add fission coverage for accessibility b-c e10s caching tests. r=Jamie Differential Revision: https://phabricator.services.mozilla.com/D48551
accessible/tests/browser/e10s/browser.ini
accessible/tests/browser/e10s/browser_caching_attributes.js
accessible/tests/browser/e10s/browser_caching_description.js
accessible/tests/browser/e10s/browser_caching_name.js
accessible/tests/browser/e10s/browser_caching_relations.js
accessible/tests/browser/e10s/browser_caching_states.js
accessible/tests/browser/e10s/browser_caching_value.js
--- a/accessible/tests/browser/e10s/browser.ini
+++ b/accessible/tests/browser/e10s/browser.ini
@@ -9,22 +9,24 @@ support-files =
   doc_treeupdate_whitespace.html
   !/accessible/tests/browser/shared-head.js
   !/accessible/tests/mochitest/*.js
   !/accessible/tests/mochitest/letters.gif
   !/accessible/tests/mochitest/moz.png
 
 # Caching tests
 [browser_caching_attributes.js]
+skip-if = fission # Bug 1556627
 [browser_caching_description.js]
 [browser_caching_name.js]
 skip-if = (os == "linux" && bits == 64) || (debug && os == "mac") || (debug && os == "win") #Bug 1388256
 [browser_caching_relations.js]
 [browser_caching_states.js]
 [browser_caching_value.js]
+skip-if = fission # Bug 1556627
 
 [browser_contentSelectDropdown.js]
 
 # Events tests
 [browser_events_announcement.js]
 skip-if = e10s && os == 'win' # Bug 1288839
 [browser_events_caretmove.js]
 skip-if = fission # Bug 1556627
--- a/accessible/tests/browser/e10s/browser_caching_attributes.js
+++ b/accessible/tests/browser/e10s/browser_caching_attributes.js
@@ -124,10 +124,11 @@ addAccessibleTask(
           await invokeSetAttribute(browser, "textbox", attr, value);
         }
       }
 
       await onUpdate;
       testAttrs(textbox, expected);
       testAbsentAttrs(textbox, unexpected);
     }
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_caching_description.js
+++ b/accessible/tests/browser/e10s/browser_caching_description.js
@@ -38,17 +38,17 @@ const tests = [
       "No description from @aria-describedby since it is the same as the " +
       "@alt attribute which is used as the name",
     attrs: [
       {
         attr: "alt",
         value: "aria description",
       },
     ],
-    waitFor: [[EVENT_REORDER, "body"]],
+    waitFor: [[EVENT_REORDER, matchContentDoc]],
     expected: "",
   },
   {
     desc:
       "Description from @aria-describedby attribute when @alt and " +
       "@aria-describedby are not the same",
     attrs: [
       {
@@ -67,17 +67,17 @@ const tests = [
       {
         attr: "alt",
       },
       {
         attr: "title",
         value: "title",
       },
     ],
-    waitFor: [[EVENT_REORDER, "body"]],
+    waitFor: [[EVENT_REORDER, matchContentDoc]],
     expected: "another description",
   },
   {
     desc:
       "No description from @aria-describedby since it is the same as the " +
       "@title attribute which is used as the name",
     attrs: [
       {
@@ -103,17 +103,17 @@ const tests = [
       "Description from @title attribute when @alt and @atitle are not the " +
       "same",
     attrs: [
       {
         attr: "alt",
         value: "aria description",
       },
     ],
-    waitFor: [[EVENT_REORDER, "body"]],
+    waitFor: [[EVENT_REORDER, matchContentDoc]],
     expected: "another description",
   },
   {
     desc:
       "No description from @title since it is the same as the @alt " +
       "attribute which is used as the name",
     attrs: [
       {
@@ -204,10 +204,11 @@ addAccessibleTask(
       await onUpdate;
       // When attribute change (alt) triggers reorder event, accessible will
       // become defunct.
       if (isDefunct(imgAcc)) {
         imgAcc = findAccessibleChildByID(accDoc, "image");
       }
       testDescr(imgAcc, expected);
     }
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_caching_name.js
+++ b/accessible/tests/browser/e10s/browser_caching_name.js
@@ -509,25 +509,29 @@ async function testNameRule(browser, tar
     } else if (rule.fromsubtree) {
       testFn = testSubtreeRule;
     }
     await testFn(browser, target, rule, expected[i]);
   }
 }
 
 markupTests.forEach(({ id, ruleset, markup, expected }) =>
-  addAccessibleTask(markup, async function(browser, accDoc) {
-    const observer = {
-      observe(subject, topic, data) {
-        const event = subject.QueryInterface(nsIAccessibleEvent);
-        console.log(eventToString(event));
-      },
-    };
-    Services.obs.addObserver(observer, "accessible-event");
-    // Find a target accessible from an accessible subtree.
-    let acc = findAccessibleChildByID(accDoc, id);
-    // Find target's parent accessible from an accessible subtree.
-    let parent = getAccessibleDOMNodeID(acc.parent);
-    let target = { id, parent, acc };
-    await testNameRule(browser, target, rules[ruleset], expected);
-    Services.obs.removeObserver(observer, "accessible-event");
-  })
+  addAccessibleTask(
+    markup,
+    async function(browser, accDoc) {
+      const observer = {
+        observe(subject, topic, data) {
+          const event = subject.QueryInterface(nsIAccessibleEvent);
+          console.log(eventToString(event));
+        },
+      };
+      Services.obs.addObserver(observer, "accessible-event");
+      // Find a target accessible from an accessible subtree.
+      let acc = findAccessibleChildByID(accDoc, id);
+      // Find target's parent accessible from an accessible subtree.
+      let parent = getAccessibleDOMNodeID(acc.parent);
+      let target = { id, parent, acc };
+      await testNameRule(browser, target, rules[ruleset], expected);
+      Services.obs.removeObserver(observer, "accessible-event");
+    },
+    { iframe: true }
+  )
 );
--- a/accessible/tests/browser/e10s/browser_caching_relations.js
+++ b/accessible/tests/browser/e10s/browser_caching_relations.js
@@ -86,10 +86,11 @@ addAccessibleTask(
   `
   <div id="dependant1">label</div>
   <div id="dependant2">label2</div>
   <div role="checkbox" id="host"></div>`,
   async function(browser, accDoc) {
     for (let spec of attrRelationsSpec) {
       await testRelated(browser, accDoc, ...spec);
     }
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_caching_states.js
+++ b/accessible/tests/browser/e10s/browser_caching_states.js
@@ -144,10 +144,11 @@ addAccessibleTask(
   `
   <input id="checkbox" type="checkbox">
   <input id="file" type="file">
   <input id="text">`,
   async function(browser, accDoc) {
     await runStateTests(browser, accDoc, "checkbox", attributeTests);
     await runStateTests(browser, accDoc, "file", ariaTests);
     await runStateTests(browser, accDoc, "text", extraStateTests);
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_caching_value.js
+++ b/accessible/tests/browser/e10s/browser_caching_value.js
@@ -24,17 +24,23 @@ const valueTests = [
     id: "select",
     expected: "1st",
   },
   {
     desc: "Value should update to 3rd when 3 is pressed",
     id: "select",
     async action(browser) {
       await invokeFocus(browser, "select");
-      await BrowserTestUtils.synthesizeKey("3", {}, browser);
+      await invokeContentTask(browser, [], () => {
+        const { ContentTaskUtils } = ChromeUtils.import(
+          "resource://testing-common/ContentTaskUtils.jsm"
+        );
+        const EventUtils = ContentTaskUtils.getEventUtils(content);
+        EventUtils.synthesizeKey("3", {}, content);
+      });
     },
     waitFor: EVENT_TEXT_VALUE_CHANGE,
     expected: "3rd",
   },
   {
     desc: "Initially value is set to @aria-valuenow for slider",
     id: "slider",
     expected: ["5", 5, 0, 7, 0],
@@ -173,10 +179,11 @@ addAccessibleTask(
       await onUpdate;
       if (Array.isArray(expected)) {
         acc.QueryInterface(nsIAccessibleValue);
         testValue(acc, ...expected);
       } else {
         is(acc.value, expected, `Correct value for ${prettyName(acc)}`);
       }
     }
-  }
+  },
+  { iframe: true }
 );