Bug 1543575 - add fission coverage for accessibility b-c e10s tree update tests. r=Jamie
☠☠ backed out by 078a8b562863 ☠ ☠
authorYura Zenevich <yura.zenevich@gmail.com>
Thu, 17 Oct 2019 15:15:18 +0000
changeset 559386 2dbafadffbd9114592c927136992571d57b86bae
parent 559385 8b92e98ee616c5a0e9d33d91d4bab5ea3209fe45
child 559387 9a67d60ec29da5f2a82b123aa93407eb2d2c6168
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 tree update tests. r=Jamie Differential Revision: https://phabricator.services.mozilla.com/D48552
accessible/tests/browser/e10s/browser.ini
accessible/tests/browser/e10s/browser_contentSelectDropdown.js
accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
accessible/tests/browser/e10s/browser_treeupdate_canvas.js
accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
accessible/tests/browser/e10s/browser_treeupdate_doc.js
accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
accessible/tests/browser/e10s/browser_treeupdate_hidden.js
accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
accessible/tests/browser/e10s/browser_treeupdate_list.js
accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
accessible/tests/browser/e10s/browser_treeupdate_listener.js
accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
accessible/tests/browser/e10s/browser_treeupdate_removal.js
accessible/tests/browser/e10s/browser_treeupdate_select_dropdown.js
accessible/tests/browser/e10s/browser_treeupdate_table.js
accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
accessible/tests/browser/e10s/browser_treeupdate_visibility.js
accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
--- a/accessible/tests/browser/e10s/browser.ini
+++ b/accessible/tests/browser/e10s/browser.ini
@@ -18,18 +18,16 @@ 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
 [browser_events_hide.js]
 [browser_events_show.js]
 [browser_events_statechange.js]
@@ -47,13 +45,15 @@ skip-if = e10s && os == 'win' # Bug 1288
 [browser_treeupdate_gencontent.js]
 [browser_treeupdate_hidden.js]
 [browser_treeupdate_imagemap.js]
 [browser_treeupdate_list.js]
 [browser_treeupdate_list_editabledoc.js]
 [browser_treeupdate_listener.js]
 [browser_treeupdate_optgroup.js]
 [browser_treeupdate_removal.js]
+[browser_treeupdate_select_dropdown.js]
+skip-if = fission # Bug 1556627
 [browser_treeupdate_table.js]
 [browser_treeupdate_textleaf.js]
 [browser_treeupdate_visibility.js]
 [browser_treeupdate_whitespace.js]
 skip-if = true # Failing due to incorrect index of test container children on document load.
deleted file mode 100644
--- a/accessible/tests/browser/e10s/browser_contentSelectDropdown.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-/* import-globals-from ../../mochitest/role.js */
-loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
-
-const snippet = `
-<select id="select">
-  <option>o1</option>
-  <optgroup label="g1">
-    <option>g1o1</option>
-    <option>g1o2</option>
-  </optgroup>
-  <optgroup label="g2">
-    <option>g2o1</option>
-    <option>g2o2</option>
-  </optgroup>
-  <option>o2</option>
-</select>
-`;
-
-addAccessibleTask(snippet, async function(browser, accDoc) {
-  await invokeFocus(browser, "select");
-  // Expand the select. A dropdown item should get focus.
-  // Note that the dropdown is rendered in the parent process.
-  let focused = waitForEvent(
-    EVENT_FOCUS,
-    event => event.accessible.role == ROLE_COMBOBOX_OPTION,
-    "Dropdown item focused after select expanded"
-  );
-  await BrowserTestUtils.synthesizeKey(
-    "KEY_ArrowDown",
-    { altKey: true },
-    browser
-  );
-  let event = await focused;
-  let dropdown = event.accessible.parent;
-
-  let selectedOptionChildren = [];
-  if (MAC) {
-    // Checkmark is part of the Mac menu styling.
-    selectedOptionChildren = [{ STATICTEXT: [] }];
-  }
-  let tree = {
-    COMBOBOX_LIST: [
-      { COMBOBOX_OPTION: selectedOptionChildren },
-      { GROUPING: [{ COMBOBOX_OPTION: [] }, { COMBOBOX_OPTION: [] }] },
-      { GROUPING: [{ COMBOBOX_OPTION: [] }, { COMBOBOX_OPTION: [] }] },
-      { COMBOBOX_OPTION: [] },
-    ],
-  };
-  testAccessibleTree(dropdown, tree);
-
-  // Collapse the select. Focus should return to the select.
-  focused = waitForEvent(
-    EVENT_FOCUS,
-    "select",
-    "select focused after collapsed"
-  );
-  await BrowserTestUtils.synthesizeKey("KEY_Escape", {}, browser);
-  await focused;
-});
--- a/accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
@@ -3,42 +3,43 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
 // Test ARIA Dialog
-addAccessibleTask("doc_treeupdate_ariadialog.html", async function(
-  browser,
-  accDoc
-) {
-  testAccessibleTree(accDoc, {
-    role: ROLE_DOCUMENT,
-    children: [],
-  });
+addAccessibleTask(
+  "doc_treeupdate_ariadialog.html",
+  async function(browser, accDoc) {
+    testAccessibleTree(accDoc, {
+      role: ROLE_DOCUMENT,
+      children: [],
+    });
 
-  // Make dialog visible and update its inner content.
-  let onShow = waitForEvent(EVENT_SHOW, "dialog");
-  await SpecialPowers.spawn(browser, [], () => {
-    content.document.getElementById("dialog").style.display = "block";
-  });
-  await onShow;
+    // Make dialog visible and update its inner content.
+    let onShow = waitForEvent(EVENT_SHOW, "dialog");
+    await invokeContentTask(browser, [], () => {
+      content.document.getElementById("dialog").style.display = "block";
+    });
+    await onShow;
 
-  testAccessibleTree(accDoc, {
-    role: ROLE_DOCUMENT,
-    children: [
-      {
-        role: ROLE_DIALOG,
-        children: [
-          {
-            role: ROLE_PUSHBUTTON,
-            children: [{ role: ROLE_TEXT_LEAF }],
-          },
-          {
-            role: ROLE_ENTRY,
-          },
-        ],
-      },
-    ],
-  });
-});
+    testAccessibleTree(accDoc, {
+      role: ROLE_DOCUMENT,
+      children: [
+        {
+          role: ROLE_DIALOG,
+          children: [
+            {
+              role: ROLE_PUSHBUTTON,
+              children: [{ role: ROLE_TEXT_LEAF }],
+            },
+            {
+              role: ROLE_ENTRY,
+            },
+          ],
+        },
+      ],
+    });
+  },
+  { iframe: true }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
@@ -81,17 +81,17 @@ async function testContainer1(browser, a
       { SECTION: [] }, // subdiv from the subtree, t1_subdiv
       { GROUPING: [] }, // group from outside, t1_group
     ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Append element ======================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [id], contentId => {
+  await invokeContentTask(browser, [id], contentId => {
     let div = content.document.createElement("div");
     div.setAttribute("id", "t1_child3");
     div.setAttribute("role", "radio");
     content.document.getElementById(contentId).appendChild(div);
   });
   await onReorder;
 
   // children are invalidated, they includes aria-owns swapped kids and
@@ -104,17 +104,17 @@ async function testContainer1(browser, a
       { SECTION: [] }, // ARIA owned, t1_subdiv
       { GROUPING: [] }, // ARIA owned, t1_group
     ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Remove element ======================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     content.document.getElementById("t1_span").remove();
   });
   await onReorder;
 
   // subdiv should go away
   tree = {
     SECTION: [
       { CHECKBUTTON: [] }, // explicit, t1_checkbox
@@ -162,17 +162,17 @@ async function removeContainer(browser, 
   let tree = {
     SECTION: [
       { CHECKBUTTON: [] }, // ARIA owned, 't2_owned'
     ],
   };
   testAccessibleTree(acc, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     content.document
       .getElementById("t2_container2")
       .removeChild(content.document.getElementById("t2_container3"));
   });
   await onReorder;
 
   tree = {
     SECTION: [],
@@ -184,17 +184,17 @@ async function stealAndRecacheChildren(b
   const id1 = "t3_container1";
   const id2 = "t3_container2";
   const acc1 = findAccessibleChildByID(accDoc, id1);
   const acc2 = findAccessibleChildByID(accDoc, id2);
 
   /* ================ Attempt to steal from other ARIA owns ================= */
   let onReorder = waitForEvent(EVENT_REORDER, id2);
   await invokeSetAttribute(browser, id2, "aria-owns", "t3_child");
-  await SpecialPowers.spawn(browser, [id2], id => {
+  await invokeContentTask(browser, [id2], id => {
     let div = content.document.createElement("div");
     div.setAttribute("role", "radio");
     content.document.getElementById(id).appendChild(div);
   });
   await onReorder;
 
   let tree = {
     SECTION: [
@@ -262,32 +262,33 @@ async function removeNotARIAOwnedEl(brow
   const acc = findAccessibleChildByID(accDoc, id);
 
   let tree = {
     SECTION: [{ TEXT_LEAF: [] }, { GROUPING: [] }],
   };
   testAccessibleTree(acc, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [id], contentId => {
+  await invokeContentTask(browser, [id], contentId => {
     content.document
       .getElementById(contentId)
       .removeChild(content.document.getElementById("t6_span"));
   });
   await onReorder;
 
   tree = {
     SECTION: [{ GROUPING: [] }],
   };
   testAccessibleTree(acc, tree);
 }
 
-addAccessibleTask("doc_treeupdate_ariaowns.html", async function(
-  browser,
-  accDoc
-) {
-  await testContainer1(browser, accDoc);
-  await removeContainer(browser, accDoc);
-  await stealAndRecacheChildren(browser, accDoc);
-  await showHiddenElement(browser, accDoc);
-  await rearrangeARIAOwns(browser, accDoc);
-  await removeNotARIAOwnedEl(browser, accDoc);
-});
+addAccessibleTask(
+  "doc_treeupdate_ariaowns.html",
+  async function(browser, accDoc) {
+    await testContainer1(browser, accDoc);
+    await removeContainer(browser, accDoc);
+    await stealAndRecacheChildren(browser, accDoc);
+    await showHiddenElement(browser, accDoc);
+    await rearrangeARIAOwns(browser, accDoc);
+    await removeNotARIAOwnedEl(browser, accDoc);
+  },
+  { iframe: true }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_canvas.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_canvas.js
@@ -18,10 +18,11 @@ addAccessibleTask(
 
     testAccessibleTree(canvas, { CANVAS: [] });
 
     let onShow = waitForEvent(EVENT_SHOW, "dialog");
     await invokeSetStyle(browser, "dialog", "display", "block");
     await onShow;
 
     testAccessibleTree(dialog, { DIALOG: [] });
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
@@ -26,17 +26,17 @@ addAccessibleTask(
             },
           ],
         },
       ],
     };
     testAccessibleTree(container, tree);
 
     let onReorder = waitForEvent(EVENT_REORDER, id1);
-    await SpecialPowers.spawn(browser, [id1], id => {
+    await invokeContentTask(browser, [id1], id => {
       let doc = content.document;
       doc.getElementById("scrollarea").style.width = "20px";
       doc.getElementById(id).appendChild(doc.createElement("input"));
     });
     await onReorder;
 
     tree = {
       SECTION: [
@@ -50,10 +50,11 @@ addAccessibleTask(
           ],
         },
         {
           ENTRY: [], // inserted input
         },
       ],
     };
     testAccessibleTree(container, tree);
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_doc.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_doc.js
@@ -29,17 +29,17 @@ addAccessibleTask(
     let tree = {
       role: ROLE_DOCUMENT,
       children: [],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Write iframe document ================================ */
     let reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [id], contentId => {
+    await invokeContentTask(browser, [id], contentId => {
       let docNode = content.document.getElementById("iframe").contentDocument;
       let newHTMLNode = docNode.createElement("html");
       let newBodyNode = docNode.createElement("body");
       let newTextNode = docNode.createTextNode("New Wave");
       newBodyNode.id = contentId;
       newBodyNode.appendChild(newTextNode);
       newHTMLNode.appendChild(newBodyNode);
       docNode.replaceChild(newHTMLNode, docNode.documentElement);
@@ -54,17 +54,17 @@ addAccessibleTask(
           name: "New Wave",
         },
       ],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Replace iframe HTML element ========================== */
     reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [id], contentId => {
+    await invokeContentTask(browser, [id], contentId => {
       let docNode = content.document.getElementById("iframe").contentDocument;
       // We can't use open/write/close outside of iframe document because of
       // security error.
       let script = docNode.createElement("script");
       script.textContent = `
       document.open();
       document.write('<body id="${contentId}">hello</body>');
       document.close();`;
@@ -80,17 +80,17 @@ addAccessibleTask(
           name: "hello",
         },
       ],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Replace iframe body ================================== */
     reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [id], contentId => {
+    await invokeContentTask(browser, [id], contentId => {
       let docNode = content.document.getElementById("iframe").contentDocument;
       let newBodyNode = docNode.createElement("body");
       let newTextNode = docNode.createTextNode("New Hello");
       newBodyNode.id = contentId;
       newBodyNode.appendChild(newTextNode);
       newBodyNode.setAttribute("role", "button");
       docNode.documentElement.replaceChild(newBodyNode, docNode.body);
     });
@@ -104,17 +104,17 @@ addAccessibleTask(
           name: "New Hello",
         },
       ],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Open iframe document ================================= */
     reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [id], contentId => {
+    await invokeContentTask(browser, [id], contentId => {
       // Open document.
       let docNode = content.document.getElementById("iframe").contentDocument;
       let script = docNode.createElement("script");
       script.textContent = `
       function closeMe() {
         document.write('Works?');
         document.close();
       }
@@ -128,17 +128,17 @@ addAccessibleTask(
     tree = {
       role: ROLE_DOCUMENT,
       children: [],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Close iframe document ================================ */
     reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [], () => {
+    await invokeContentTask(browser, [], () => {
       // Write and close document.
       let docNode = content.document.getElementById("iframe").contentDocument;
       docNode.write("Works?");
       docNode.close();
     });
     await reorderEventPromise;
 
     tree = {
@@ -149,17 +149,17 @@ addAccessibleTask(
           name: "Works?",
         },
       ],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Remove HTML from iframe document ===================== */
     reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-    await SpecialPowers.spawn(browser, [], () => {
+    await invokeContentTask(browser, [], () => {
       // Remove HTML element.
       let docNode = content.document.getElementById("iframe").contentDocument;
       docNode.firstChild.remove();
     });
     let event = await reorderEventPromise;
 
     ok(
       event.accessible instanceof nsIAccessibleDocument,
@@ -168,17 +168,17 @@ addAccessibleTask(
     tree = {
       role: ROLE_DOCUMENT,
       children: [],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Insert HTML to iframe document ======================= */
     reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [id], contentId => {
+    await invokeContentTask(browser, [id], contentId => {
       // Insert HTML element.
       let docNode = content.document.getElementById("iframe").contentDocument;
       let html = docNode.createElement("html");
       let body = docNode.createElement("body");
       let text = docNode.createTextNode("Haha");
       body.appendChild(text);
       body.id = contentId;
       html.appendChild(body);
@@ -194,17 +194,17 @@ addAccessibleTask(
           name: "Haha",
         },
       ],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Remove body from iframe document ===================== */
     reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-    await SpecialPowers.spawn(browser, [], () => {
+    await invokeContentTask(browser, [], () => {
       // Remove body element.
       let docNode = content.document.getElementById("iframe").contentDocument;
       docNode.documentElement.removeChild(docNode.body);
     });
     event = await reorderEventPromise;
 
     ok(
       event.accessible instanceof nsIAccessibleDocument,
@@ -213,17 +213,17 @@ addAccessibleTask(
     tree = {
       role: ROLE_DOCUMENT,
       children: [],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================ Insert element under document element while body missed */
     reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-    await SpecialPowers.spawn(browser, [], () => {
+    await invokeContentTask(browser, [], () => {
       let docNode = content.document.getElementById("iframe").contentDocument;
       let inputNode = (content.window.inputNode = docNode.createElement(
         "input"
       ));
       docNode.documentElement.appendChild(inputNode);
     });
     event = await reorderEventPromise;
 
@@ -232,33 +232,33 @@ addAccessibleTask(
       "Reorder should happen on the document"
     );
     tree = {
       DOCUMENT: [{ ENTRY: [] }],
     };
     testAccessibleTree(iframe, tree);
 
     reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-    await SpecialPowers.spawn(browser, [], () => {
+    await invokeContentTask(browser, [], () => {
       let docEl = content.document.getElementById("iframe").contentDocument
         .documentElement;
       // Remove aftermath of this test before next test starts.
       docEl.firstChild.remove();
     });
     // Make sure reorder event was fired and that the input was removed.
     await reorderEventPromise;
     tree = {
       role: ROLE_DOCUMENT,
       children: [],
     };
     testAccessibleTree(iframe, tree);
 
     /* ================= Insert body to iframe document ======================= */
     reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [id], contentId => {
+    await invokeContentTask(browser, [id], contentId => {
       // Write and close document.
       let docNode = content.document.getElementById("iframe").contentDocument;
       // Insert body element.
       let body = docNode.createElement("body");
       let text = docNode.createTextNode("Yo ho ho i butylka roma!");
       body.appendChild(text);
       body.id = contentId;
       docNode.documentElement.appendChild(body);
@@ -289,17 +289,17 @@ addAccessibleTask(
     tree = {
       INTERNAL_FRAME: [{ DOCUMENT: [{ ENTRY: [] }] }],
     };
     testAccessibleTree(event.accessible, tree);
     iframe = findAccessibleChildByID(event.accessible, id);
 
     /* ================= Replace iframe body on ARIA role body ================ */
     reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-    await SpecialPowers.spawn(browser, [id], contentId => {
+    await invokeContentTask(browser, [id], contentId => {
       let docNode = content.document.getElementById("iframe").contentDocument;
       let newBodyNode = docNode.createElement("body");
       let newTextNode = docNode.createTextNode("New Hello");
       newBodyNode.appendChild(newTextNode);
       newBodyNode.setAttribute("role", "button");
       newBodyNode.id = contentId;
       docNode.documentElement.replaceChild(newBodyNode, docNode.body);
     });
@@ -310,10 +310,11 @@ addAccessibleTask(
       children: [
         {
           role: ROLE_TEXT_LEAF,
           name: "New Hello",
         },
       ],
     };
     testAccessibleTree(iframe, tree);
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
@@ -42,17 +42,17 @@ addAccessibleTask(
           ],
         },
       ],
     };
     testAccessibleTree(container2, tree);
 
     let onReorder = waitForEvent(EVENT_REORDER, id1);
     // Create and add an element with CSS generated content to container1
-    await SpecialPowers.spawn(browser, [id1], id => {
+    await invokeContentTask(browser, [id1], id => {
       let node = content.document.createElement("div");
       node.textContent = "text";
       node.setAttribute("class", "gentext");
       content.document.getElementById(id).appendChild(node);
     });
     await onReorder;
 
     tree = {
@@ -84,10 +84,11 @@ addAccessibleTask(
             { STATICTEXT: [] }, // :before
             { TEXT_LEAF: [] }, // primary text
             { STATICTEXT: [] }, // :after
           ],
         },
       ],
     };
     testAccessibleTree(container2, tree);
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_hidden.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_hidden.js
@@ -22,10 +22,11 @@ addAccessibleTask(
 
     // Set @hidden attribute
     await setHidden(browser, "true");
     testAccessibleTree(container, { SECTION: [] });
 
     // Remove @hidden attribute
     await setHidden(browser);
     testAccessibleTree(container, { SECTION: [{ ENTRY: [] }] });
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
@@ -14,17 +14,17 @@ async function testImageMap(browser, acc
   /* ================= Initial tree test ==================================== */
   let tree = {
     IMAGE_MAP: [{ role: ROLE_LINK, name: "b", children: [] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Insert area ========================================== */
   let onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     let areaElm = content.document.createElement("area");
     let mapNode = content.document.getElementById("map");
     areaElm.setAttribute(
       "href",
       "http://www.bbc.co.uk/radio4/atoz/index.shtml#a"
     );
     areaElm.setAttribute("coords", "0,0,13,14");
     areaElm.setAttribute("alt", "a");
@@ -38,17 +38,17 @@ async function testImageMap(browser, acc
       { role: ROLE_LINK, name: "a", children: [] },
       { role: ROLE_LINK, name: "b", children: [] },
     ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Append area ========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     let areaElm = content.document.createElement("area");
     let mapNode = content.document.getElementById("map");
     areaElm.setAttribute(
       "href",
       "http://www.bbc.co.uk/radio4/atoz/index.shtml#c"
     );
     areaElm.setAttribute("coords", "34,0,47,14");
     areaElm.setAttribute("alt", "c");
@@ -63,17 +63,17 @@ async function testImageMap(browser, acc
       { role: ROLE_LINK, name: "b", children: [] },
       { role: ROLE_LINK, name: "c", children: [] },
     ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Remove area ========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     let mapNode = content.document.getElementById("map");
     mapNode.removeChild(mapNode.firstElementChild);
   });
   await onReorder;
 
   tree = {
     IMAGE_MAP: [
       { role: ROLE_LINK, name: "b", children: [] },
@@ -95,50 +95,56 @@ async function testContainer(browser) {
     SECTION: [{ GRAPHIC: [] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Restore name on map ================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetAttribute(browser, "map", "name", "atoz_map");
   // XXX: force repainting of the image (see bug 745788 for details).
-  await BrowserTestUtils.synthesizeMouse(
-    "#imgmap",
-    10,
-    10,
-    { type: "mousemove" },
-    browser
-  );
+  await invokeContentTask(browser, [], () => {
+    const { ContentTaskUtils } = ChromeUtils.import(
+      "resource://testing-common/ContentTaskUtils.jsm"
+    );
+    const EventUtils = ContentTaskUtils.getEventUtils(content);
+    EventUtils.synthesizeMouse(
+      content.document.getElementById("imgmap"),
+      10,
+      10,
+      { type: "mousemove" },
+      content
+    );
+  });
   await onReorder;
 
   tree = {
     SECTION: [
       {
         IMAGE_MAP: [{ LINK: [] }, { LINK: [] }],
       },
     ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Remove map =========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     let mapNode = content.document.getElementById("map");
     mapNode.remove();
   });
   await onReorder;
 
   tree = {
     SECTION: [{ GRAPHIC: [] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Insert map =========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [id], contentId => {
+  await invokeContentTask(browser, [id], contentId => {
     let map = content.document.createElement("map");
     let area = content.document.createElement("area");
 
     map.setAttribute("name", "atoz_map");
     map.setAttribute("id", "map");
 
     area.setAttribute("href", "http://www.bbc.co.uk/radio4/atoz/index.shtml#b");
     area.setAttribute("coords", "17,0,30,14");
@@ -174,26 +180,33 @@ async function waitForImageMap(browser, 
   const id = "imgmap";
   const acc = findAccessibleChildByID(accDoc, id);
   if (acc.firstChild) {
     return;
   }
 
   const onReorder = waitForEvent(EVENT_REORDER, id);
   // Wave over image map
-  await BrowserTestUtils.synthesizeMouse(
-    `#${id}`,
-    10,
-    10,
-    { type: "mousemove" },
-    browser
-  );
+  await invokeContentTask(browser, [id], contentId => {
+    const { ContentTaskUtils } = ChromeUtils.import(
+      "resource://testing-common/ContentTaskUtils.jsm"
+    );
+    const EventUtils = ContentTaskUtils.getEventUtils(content);
+    EventUtils.synthesizeMouse(
+      content.document.getElementById(contentId),
+      10,
+      10,
+      { type: "mousemove" },
+      content
+    );
+  });
   await onReorder;
 }
 
-addAccessibleTask("doc_treeupdate_imagemap.html", async function(
-  browser,
-  accDoc
-) {
-  await waitForImageMap(browser, accDoc);
-  await testImageMap(browser, accDoc);
-  await testContainer(browser);
-});
+addAccessibleTask(
+  "doc_treeupdate_imagemap.html",
+  async function(browser, accDoc) {
+    await waitForImageMap(browser, accDoc);
+    await testImageMap(browser, accDoc);
+    await testContainer(browser);
+  },
+  { iframe: true }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_list.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_list.js
@@ -42,10 +42,11 @@ addAccessibleTask(
     ok(isDefunct(bullet), "Check that bullet is defunct.");
 
     let event = await setDisplayAndWaitForReorder(browser, "list-item");
 
     testAccessibleTree(
       findAccessibleChildByID(event.accessible, "li"),
       accTree
     );
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
@@ -2,38 +2,47 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask('<ol id="list"></ol>', async function(browser, accDoc) {
-  let list = findAccessibleChildByID(accDoc, "list");
+addAccessibleTask(
+  '<ol id="list"></ol>',
+  async function(browser, accDoc) {
+    let list = findAccessibleChildByID(accDoc, "list");
 
-  testAccessibleTree(list, {
-    role: ROLE_LIST,
-    children: [],
-  });
+    testAccessibleTree(list, {
+      role: ROLE_LIST,
+      children: [],
+    });
 
-  await invokeSetAttribute(browser, "body", "contentEditable", "true");
-  let onReorder = waitForEvent(EVENT_REORDER, "list");
-  await SpecialPowers.spawn(browser, [], () => {
-    let li = content.document.createElement("li");
-    li.textContent = "item";
-    content.document.getElementById("list").appendChild(li);
-  });
-  await onReorder;
+    await invokeSetAttribute(
+      browser,
+      currentContentDoc(),
+      "contentEditable",
+      "true"
+    );
+    let onReorder = waitForEvent(EVENT_REORDER, "list");
+    await invokeContentTask(browser, [], () => {
+      let li = content.document.createElement("li");
+      li.textContent = "item";
+      content.document.getElementById("list").appendChild(li);
+    });
+    await onReorder;
 
-  testAccessibleTree(list, {
-    role: ROLE_LIST,
-    children: [
-      {
-        role: ROLE_LISTITEM,
-        children: [
-          { role: ROLE_STATICTEXT, name: "1. ", children: [] },
-          { role: ROLE_TEXT_LEAF, children: [] },
-        ],
-      },
-    ],
-  });
-});
+    testAccessibleTree(list, {
+      role: ROLE_LIST,
+      children: [
+        {
+          role: ROLE_LISTITEM,
+          children: [
+            { role: ROLE_STATICTEXT, name: "1. ", children: [] },
+            { role: ROLE_TEXT_LEAF, children: [] },
+          ],
+        },
+      ],
+    });
+  },
+  { iframe: true }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_listener.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_listener.js
@@ -16,22 +16,23 @@ addAccessibleTask(
       "Check that parent is not accessible."
     );
     is(
       findAccessibleChildByID(accDoc, "child"),
       null,
       "Check that child is not accessible."
     );
 
-    let onReorder = waitForEvent(EVENT_REORDER, "body");
+    let onReorder = waitForEvent(EVENT_REORDER, matchContentDoc);
     // Add an event listener to parent.
-    await SpecialPowers.spawn(browser, [], () => {
+    await invokeContentTask(browser, [], () => {
       content.window.dummyListener = () => {};
       content.document
         .getElementById("parent")
         .addEventListener("click", content.window.dummyListener);
     });
     await onReorder;
 
     let tree = { TEXT: [] };
     testAccessibleTree(findAccessibleChildByID(accDoc, "parent"), tree);
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
@@ -2,98 +2,102 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask('<select id="select"></select>', async function(
-  browser,
-  accDoc
-) {
-  let select = findAccessibleChildByID(accDoc, "select");
+addAccessibleTask(
+  '<select id="select"></select>',
+  async function(browser, accDoc) {
+    let select = findAccessibleChildByID(accDoc, "select");
 
-  let onEvent = waitForEvent(EVENT_REORDER, "select");
-  // Create a combobox with grouping and 2 standalone options
-  await SpecialPowers.spawn(browser, [], () => {
-    let doc = content.document;
-    let contentSelect = doc.getElementById("select");
-    let optGroup = doc.createElement("optgroup");
+    let onEvent = waitForEvent(EVENT_REORDER, "select");
+    // Create a combobox with grouping and 2 standalone options
+    await invokeContentTask(browser, [], () => {
+      let doc = content.document;
+      let contentSelect = doc.getElementById("select");
+      let optGroup = doc.createElement("optgroup");
 
-    for (let i = 0; i < 2; i++) {
-      let opt = doc.createElement("option");
-      opt.value = i;
-      opt.text = "Option: Value " + i;
-      optGroup.appendChild(opt);
-    }
-    contentSelect.add(optGroup, null);
+      for (let i = 0; i < 2; i++) {
+        let opt = doc.createElement("option");
+        opt.value = i;
+        opt.text = "Option: Value " + i;
+        optGroup.appendChild(opt);
+      }
+      contentSelect.add(optGroup, null);
 
-    for (let i = 0; i < 2; i++) {
-      let opt = doc.createElement("option");
-      contentSelect.add(opt, null);
-    }
-    contentSelect.firstChild.firstChild.id = "option1Node";
-  });
-  let event = await onEvent;
-  let option1Node = findAccessibleChildByID(event.accessible, "option1Node");
+      for (let i = 0; i < 2; i++) {
+        let opt = doc.createElement("option");
+        contentSelect.add(opt, null);
+      }
+      contentSelect.firstChild.firstChild.id = "option1Node";
+    });
+    let event = await onEvent;
+    let option1Node = findAccessibleChildByID(event.accessible, "option1Node");
 
-  let tree = {
-    COMBOBOX: [
-      {
-        COMBOBOX_LIST: [
-          {
-            GROUPING: [
-              { COMBOBOX_OPTION: [{ TEXT_LEAF: [] }] },
-              { COMBOBOX_OPTION: [{ TEXT_LEAF: [] }] },
-            ],
-          },
-          {
-            COMBOBOX_OPTION: [],
-          },
-          {
-            COMBOBOX_OPTION: [],
-          },
-        ],
-      },
-    ],
-  };
-  testAccessibleTree(select, tree);
-  ok(!isDefunct(option1Node), "option shouldn't be defunct");
+    let tree = {
+      COMBOBOX: [
+        {
+          COMBOBOX_LIST: [
+            {
+              GROUPING: [
+                { COMBOBOX_OPTION: [{ TEXT_LEAF: [] }] },
+                { COMBOBOX_OPTION: [{ TEXT_LEAF: [] }] },
+              ],
+            },
+            {
+              COMBOBOX_OPTION: [],
+            },
+            {
+              COMBOBOX_OPTION: [],
+            },
+          ],
+        },
+      ],
+    };
+    testAccessibleTree(select, tree);
+    ok(!isDefunct(option1Node), "option shouldn't be defunct");
+
+    onEvent = waitForEvent(EVENT_REORDER, "select");
+    // Remove grouping from combobox
+    await invokeContentTask(browser, [], () => {
+      let contentSelect = content.document.getElementById("select");
+      contentSelect.firstChild.remove();
+    });
+    await onEvent;
 
-  onEvent = waitForEvent(EVENT_REORDER, "select");
-  // Remove grouping from combobox
-  await SpecialPowers.spawn(browser, [], () => {
-    let contentSelect = content.document.getElementById("select");
-    contentSelect.firstChild.remove();
-  });
-  await onEvent;
-
-  tree = {
-    COMBOBOX: [
-      {
-        COMBOBOX_LIST: [{ COMBOBOX_OPTION: [] }, { COMBOBOX_OPTION: [] }],
-      },
-    ],
-  };
-  testAccessibleTree(select, tree);
-  ok(isDefunct(option1Node), "removed option shouldn't be accessible anymore!");
+    tree = {
+      COMBOBOX: [
+        {
+          COMBOBOX_LIST: [{ COMBOBOX_OPTION: [] }, { COMBOBOX_OPTION: [] }],
+        },
+      ],
+    };
+    testAccessibleTree(select, tree);
+    ok(
+      isDefunct(option1Node),
+      "removed option shouldn't be accessible anymore!"
+    );
 
-  onEvent = waitForEvent(EVENT_REORDER, "select");
-  // Remove all options from combobox
-  await SpecialPowers.spawn(browser, [], () => {
-    let contentSelect = content.document.getElementById("select");
-    while (contentSelect.length) {
-      contentSelect.remove(0);
-    }
-  });
-  await onEvent;
+    onEvent = waitForEvent(EVENT_REORDER, "select");
+    // Remove all options from combobox
+    await invokeContentTask(browser, [], () => {
+      let contentSelect = content.document.getElementById("select");
+      while (contentSelect.length) {
+        contentSelect.remove(0);
+      }
+    });
+    await onEvent;
 
-  tree = {
-    COMBOBOX: [
-      {
-        COMBOBOX_LIST: [],
-      },
-    ],
-  };
-  testAccessibleTree(select, tree);
-});
+    tree = {
+      COMBOBOX: [
+        {
+          COMBOBOX_LIST: [],
+        },
+      ],
+    };
+    testAccessibleTree(select, tree);
+  },
+  { iframe: true }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_removal.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_removal.js
@@ -2,56 +2,57 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask("doc_treeupdate_removal.xhtml", async function(
-  browser,
-  accDoc
-) {
-  ok(
-    isAccessible(findAccessibleChildByID(accDoc, "the_table")),
-    "table should be accessible"
-  );
+addAccessibleTask(
+  "doc_treeupdate_removal.xhtml",
+  async function(browser, accDoc) {
+    ok(
+      isAccessible(findAccessibleChildByID(accDoc, "the_table")),
+      "table should be accessible"
+    );
 
-  // Move the_table element into hidden subtree.
-  let onReorder = waitForEvent(EVENT_REORDER, "body");
-  await SpecialPowers.spawn(browser, [], () => {
-    content.document
-      .getElementById("the_displaynone")
-      .appendChild(content.document.getElementById("the_table"));
-  });
-  await onReorder;
+    // Move the_table element into hidden subtree.
+    let onReorder = waitForEvent(EVENT_REORDER, matchContentDoc);
+    await invokeContentTask(browser, [], () => {
+      content.document
+        .getElementById("the_displaynone")
+        .appendChild(content.document.getElementById("the_table"));
+    });
+    await onReorder;
 
-  ok(
-    !isAccessible(findAccessibleChildByID(accDoc, "the_table")),
-    "table in display none tree shouldn't be accessible"
-  );
-  ok(
-    !isAccessible(findAccessibleChildByID(accDoc, "the_row")),
-    "row shouldn't be accessible"
-  );
-
-  // Remove the_row element (since it did not have accessible, no event needed).
-  await SpecialPowers.spawn(browser, [], () => {
-    content.document.body.removeChild(
-      content.document.getElementById("the_row")
+    ok(
+      !isAccessible(findAccessibleChildByID(accDoc, "the_table")),
+      "table in display none tree shouldn't be accessible"
+    );
+    ok(
+      !isAccessible(findAccessibleChildByID(accDoc, "the_row")),
+      "row shouldn't be accessible"
     );
-  });
+
+    // Remove the_row element (since it did not have accessible, no event needed).
+    await invokeContentTask(browser, [], () => {
+      content.document.body.removeChild(
+        content.document.getElementById("the_row")
+      );
+    });
 
-  // make sure no accessibles have stuck around.
-  ok(
-    !isAccessible(findAccessibleChildByID(accDoc, "the_row")),
-    "row shouldn't be accessible"
-  );
-  ok(
-    !isAccessible(findAccessibleChildByID(accDoc, "the_table")),
-    "table shouldn't be accessible"
-  );
-  ok(
-    !isAccessible(findAccessibleChildByID(accDoc, "the_displayNone")),
-    "display none things shouldn't be accessible"
-  );
-});
+    // make sure no accessibles have stuck around.
+    ok(
+      !isAccessible(findAccessibleChildByID(accDoc, "the_row")),
+      "row shouldn't be accessible"
+    );
+    ok(
+      !isAccessible(findAccessibleChildByID(accDoc, "the_table")),
+      "table shouldn't be accessible"
+    );
+    ok(
+      !isAccessible(findAccessibleChildByID(accDoc, "the_displayNone")),
+      "display none things shouldn't be accessible"
+    );
+  },
+  { iframe: true }
+);
new file mode 100644
--- /dev/null
+++ b/accessible/tests/browser/e10s/browser_treeupdate_select_dropdown.js
@@ -0,0 +1,77 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+/* import-globals-from ../../mochitest/role.js */
+loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
+
+const snippet = `
+<select id="select">
+  <option>o1</option>
+  <optgroup label="g1">
+    <option>g1o1</option>
+    <option>g1o2</option>
+  </optgroup>
+  <optgroup label="g2">
+    <option>g2o1</option>
+    <option>g2o2</option>
+  </optgroup>
+  <option>o2</option>
+</select>
+`;
+
+addAccessibleTask(
+  snippet,
+  async function(browser, accDoc) {
+    await invokeFocus(browser, "select");
+    // Expand the select. A dropdown item should get focus.
+    // Note that the dropdown is rendered in the parent process.
+    let focused = waitForEvent(
+      EVENT_FOCUS,
+      event => event.accessible.role == ROLE_COMBOBOX_OPTION,
+      "Dropdown item focused after select expanded"
+    );
+    await invokeContentTask(browser, [], () => {
+      const { ContentTaskUtils } = ChromeUtils.import(
+        "resource://testing-common/ContentTaskUtils.jsm"
+      );
+      const EventUtils = ContentTaskUtils.getEventUtils(content);
+      EventUtils.synthesizeKey("VK_DOWN", { altKey: true }, content);
+    });
+    let event = await focused;
+    let dropdown = event.accessible.parent;
+
+    let selectedOptionChildren = [];
+    if (MAC) {
+      // Checkmark is part of the Mac menu styling.
+      selectedOptionChildren = [{ STATICTEXT: [] }];
+    }
+    let tree = {
+      COMBOBOX_LIST: [
+        { COMBOBOX_OPTION: selectedOptionChildren },
+        { GROUPING: [{ COMBOBOX_OPTION: [] }, { COMBOBOX_OPTION: [] }] },
+        { GROUPING: [{ COMBOBOX_OPTION: [] }, { COMBOBOX_OPTION: [] }] },
+        { COMBOBOX_OPTION: [] },
+      ],
+    };
+    testAccessibleTree(dropdown, tree);
+
+    // Collapse the select. Focus should return to the select.
+    focused = waitForEvent(
+      EVENT_FOCUS,
+      "select",
+      "select focused after collapsed"
+    );
+    await invokeContentTask(browser, [], () => {
+      const { ContentTaskUtils } = ChromeUtils.import(
+        "resource://testing-common/ContentTaskUtils.jsm"
+      );
+      const EventUtils = ContentTaskUtils.getEventUtils(content);
+      EventUtils.synthesizeKey("VK_ESCAPE", {}, content);
+    });
+    await focused;
+  },
+  { iframe: true }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_table.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_table.js
@@ -21,27 +21,28 @@ addAccessibleTask(
     let tree = {
       TABLE: [
         { ROW: [{ CELL: [{ TEXT_LEAF: [] }] }, { CELL: [{ TEXT_LEAF: [] }] }] },
       ],
     };
     testAccessibleTree(table, tree);
 
     let onReorder = waitForEvent(EVENT_REORDER, "table");
-    await SpecialPowers.spawn(browser, [], () => {
+    await invokeContentTask(browser, [], () => {
       // append a caption, it should appear as a first element in the
       // accessible tree.
       let doc = content.document;
       let caption = doc.createElement("caption");
       caption.textContent = "table caption";
       doc.getElementById("table").appendChild(caption);
     });
     await onReorder;
 
     tree = {
       TABLE: [
         { CAPTION: [{ TEXT_LEAF: [] }] },
         { ROW: [{ CELL: [{ TEXT_LEAF: [] }] }, { CELL: [{ TEXT_LEAF: [] }] }] },
       ],
     };
     testAccessibleTree(table, tree);
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
@@ -10,17 +10,17 @@ loadScripts({ name: "role.js", dir: MOCH
 async function removeTextData(browser, accessible, id, role) {
   let tree = {
     role,
     children: [{ role: ROLE_TEXT_LEAF, name: "text" }],
   };
   testAccessibleTree(accessible, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, id);
-  await SpecialPowers.spawn(browser, [id], contentId => {
+  await invokeContentTask(browser, [id], contentId => {
     content.document.getElementById(contentId).firstChild.textContent = "";
   });
   await onReorder;
 
   tree = { role, children: [] };
   testAccessibleTree(accessible, tree);
 }
 
@@ -28,10 +28,11 @@ addAccessibleTask(
   `
   <p id="p">text</p>
   <pre id="pre">text</pre>`,
   async function(browser, accDoc) {
     let p = findAccessibleChildByID(accDoc, "p");
     let pre = findAccessibleChildByID(accDoc, "pre");
     await removeTextData(browser, p, "p", ROLE_PARAGRAPH);
     await removeTextData(browser, pre, "pre", ROLE_TEXT_CONTAINER);
-  }
+  },
+  { iframe: true }
 );
--- a/accessible/tests/browser/e10s/browser_treeupdate_visibility.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_visibility.js
@@ -44,17 +44,17 @@ async function test3(browser, accessible
           },
         ],
       },
     ],
   };
   testAccessibleTree(accessible, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, "t3_container");
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     let doc = content.document;
     doc.getElementById("t3_container").style.color = "red";
     doc.getElementById("t3_parent").style.visibility = "hidden";
     doc.getElementById("t3_parent2").style.visibility = "hidden";
   });
   await onReorder;
 
   tree = {
@@ -79,17 +79,17 @@ async function test3(browser, accessible
 
 async function test4(browser, accessible) {
   let tree = {
     SECTION: [{ TABLE: [{ ROW: [{ CELL: [] }] }] }],
   };
   testAccessibleTree(accessible, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, "t4_parent");
-  await SpecialPowers.spawn(browser, [], () => {
+  await invokeContentTask(browser, [], () => {
     let doc = content.document;
     doc.getElementById("t4_container").style.color = "red";
     doc.getElementById("t4_child").style.visibility = "visible";
   });
   await onReorder;
 
   tree = {
     SECTION: [
@@ -112,230 +112,231 @@ async function test4(browser, accessible
           },
         ],
       },
     ],
   };
   testAccessibleTree(accessible, tree);
 }
 
-addAccessibleTask("doc_treeupdate_visibility.html", async function(
-  browser,
-  accDoc
-) {
-  let t3Container = findAccessibleChildByID(accDoc, "t3_container");
-  let t4Container = findAccessibleChildByID(accDoc, "t4_container");
+addAccessibleTask(
+  "doc_treeupdate_visibility.html",
+  async function(browser, accDoc) {
+    let t3Container = findAccessibleChildByID(accDoc, "t3_container");
+    let t4Container = findAccessibleChildByID(accDoc, "t4_container");
 
-  await testTreeOnHide(
-    browser,
-    accDoc,
-    "t1_container",
-    "t1_parent",
-    {
-      SECTION: [
-        {
-          SECTION: [
-            {
-              SECTION: [{ TEXT_LEAF: [] }],
-            },
-          ],
-        },
-      ],
-    },
-    {
-      SECTION: [
-        {
-          SECTION: [{ TEXT_LEAF: [] }],
-        },
-      ],
-    }
-  );
+    await testTreeOnHide(
+      browser,
+      accDoc,
+      "t1_container",
+      "t1_parent",
+      {
+        SECTION: [
+          {
+            SECTION: [
+              {
+                SECTION: [{ TEXT_LEAF: [] }],
+              },
+            ],
+          },
+        ],
+      },
+      {
+        SECTION: [
+          {
+            SECTION: [{ TEXT_LEAF: [] }],
+          },
+        ],
+      }
+    );
 
-  await testTreeOnHide(
-    browser,
-    accDoc,
-    "t2_container",
-    "t2_grandparent",
-    {
-      SECTION: [
-        {
-          // container
-          SECTION: [
-            {
-              // grand parent
-              SECTION: [
-                {
-                  SECTION: [
-                    {
-                      // child
-                      TEXT_LEAF: [],
-                    },
-                  ],
-                },
-                {
-                  SECTION: [
-                    {
-                      // child2
-                      TEXT_LEAF: [],
-                    },
-                  ],
-                },
-              ],
-            },
-          ],
-        },
-      ],
-    },
-    {
-      SECTION: [
-        {
-          // container
-          SECTION: [
-            {
-              // child
-              TEXT_LEAF: [],
-            },
-          ],
-        },
-        {
-          SECTION: [
-            {
-              // child2
-              TEXT_LEAF: [],
-            },
-          ],
-        },
-      ],
-    }
-  );
+    await testTreeOnHide(
+      browser,
+      accDoc,
+      "t2_container",
+      "t2_grandparent",
+      {
+        SECTION: [
+          {
+            // container
+            SECTION: [
+              {
+                // grand parent
+                SECTION: [
+                  {
+                    SECTION: [
+                      {
+                        // child
+                        TEXT_LEAF: [],
+                      },
+                    ],
+                  },
+                  {
+                    SECTION: [
+                      {
+                        // child2
+                        TEXT_LEAF: [],
+                      },
+                    ],
+                  },
+                ],
+              },
+            ],
+          },
+        ],
+      },
+      {
+        SECTION: [
+          {
+            // container
+            SECTION: [
+              {
+                // child
+                TEXT_LEAF: [],
+              },
+            ],
+          },
+          {
+            SECTION: [
+              {
+                // child2
+                TEXT_LEAF: [],
+              },
+            ],
+          },
+        ],
+      }
+    );
 
-  await test3(browser, t3Container);
-  await test4(browser, t4Container);
+    await test3(browser, t3Container);
+    await test4(browser, t4Container);
 
-  await testTreeOnHide(
-    browser,
-    accDoc,
-    "t5_container",
-    "t5_subcontainer",
-    {
-      SECTION: [
-        {
-          // container
-          SECTION: [
-            {
-              // subcontainer
-              TABLE: [
-                {
-                  ROW: [
-                    {
-                      CELL: [
-                        {
-                          SECTION: [
-                            {
-                              // child
-                              TEXT_LEAF: [],
-                            },
-                          ],
-                        },
-                      ],
-                    },
-                  ],
-                },
-              ],
-            },
-          ],
-        },
-      ],
-    },
-    {
-      SECTION: [
-        {
-          // container
-          SECTION: [
-            {
-              // child
-              TEXT_LEAF: [],
-            },
-          ],
-        },
-      ],
-    }
-  );
+    await testTreeOnHide(
+      browser,
+      accDoc,
+      "t5_container",
+      "t5_subcontainer",
+      {
+        SECTION: [
+          {
+            // container
+            SECTION: [
+              {
+                // subcontainer
+                TABLE: [
+                  {
+                    ROW: [
+                      {
+                        CELL: [
+                          {
+                            SECTION: [
+                              {
+                                // child
+                                TEXT_LEAF: [],
+                              },
+                            ],
+                          },
+                        ],
+                      },
+                    ],
+                  },
+                ],
+              },
+            ],
+          },
+        ],
+      },
+      {
+        SECTION: [
+          {
+            // container
+            SECTION: [
+              {
+                // child
+                TEXT_LEAF: [],
+              },
+            ],
+          },
+        ],
+      }
+    );
 
-  await testTreeOnHide(
-    browser,
-    accDoc,
-    "t6_container",
-    "t6_subcontainer",
-    {
-      SECTION: [
-        {
-          // container
-          SECTION: [
-            {
-              // subcontainer
-              TABLE: [
-                {
-                  ROW: [
-                    {
-                      CELL: [
-                        {
-                          TABLE: [
-                            {
-                              // nested table
-                              ROW: [
-                                {
-                                  CELL: [
-                                    {
-                                      SECTION: [
-                                        {
-                                          // child
-                                          TEXT_LEAF: [],
-                                        },
-                                      ],
-                                    },
-                                  ],
-                                },
-                              ],
-                            },
-                          ],
-                        },
-                      ],
-                    },
-                  ],
-                },
-              ],
-            },
-            {
-              SECTION: [
-                {
-                  // child2
-                  TEXT_LEAF: [],
-                },
-              ],
-            },
-          ],
-        },
-      ],
-    },
-    {
-      SECTION: [
-        {
-          // container
-          SECTION: [
-            {
-              // child
-              TEXT_LEAF: [],
-            },
-          ],
-        },
-        {
-          SECTION: [
-            {
-              // child2
-              TEXT_LEAF: [],
-            },
-          ],
-        },
-      ],
-    }
-  );
-});
+    await testTreeOnHide(
+      browser,
+      accDoc,
+      "t6_container",
+      "t6_subcontainer",
+      {
+        SECTION: [
+          {
+            // container
+            SECTION: [
+              {
+                // subcontainer
+                TABLE: [
+                  {
+                    ROW: [
+                      {
+                        CELL: [
+                          {
+                            TABLE: [
+                              {
+                                // nested table
+                                ROW: [
+                                  {
+                                    CELL: [
+                                      {
+                                        SECTION: [
+                                          {
+                                            // child
+                                            TEXT_LEAF: [],
+                                          },
+                                        ],
+                                      },
+                                    ],
+                                  },
+                                ],
+                              },
+                            ],
+                          },
+                        ],
+                      },
+                    ],
+                  },
+                ],
+              },
+              {
+                SECTION: [
+                  {
+                    // child2
+                    TEXT_LEAF: [],
+                  },
+                ],
+              },
+            ],
+          },
+        ],
+      },
+      {
+        SECTION: [
+          {
+            // container
+            SECTION: [
+              {
+                // child
+                TEXT_LEAF: [],
+              },
+            ],
+          },
+          {
+            SECTION: [
+              {
+                // child2
+                TEXT_LEAF: [],
+              },
+            ],
+          },
+        ],
+      }
+    );
+  },
+  { iframe: true }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
@@ -2,66 +2,67 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask("doc_treeupdate_whitespace.html", async function(
-  browser,
-  accDoc
-) {
-  let container1 = findAccessibleChildByID(accDoc, "container1");
-  let container2Parent = findAccessibleChildByID(accDoc, "container2-parent");
+addAccessibleTask(
+  "doc_treeupdate_whitespace.html",
+  async function(browser, accDoc) {
+    let container1 = findAccessibleChildByID(accDoc, "container1");
+    let container2Parent = findAccessibleChildByID(accDoc, "container2-parent");
 
-  let tree = {
-    SECTION: [
-      { GRAPHIC: [] },
-      { TEXT_LEAF: [] },
-      { GRAPHIC: [] },
-      { TEXT_LEAF: [] },
-      { GRAPHIC: [] },
-    ],
-  };
-  testAccessibleTree(container1, tree);
+    let tree = {
+      SECTION: [
+        { GRAPHIC: [] },
+        { TEXT_LEAF: [] },
+        { GRAPHIC: [] },
+        { TEXT_LEAF: [] },
+        { GRAPHIC: [] },
+      ],
+    };
+    testAccessibleTree(container1, tree);
 
-  let onReorder = waitForEvent(EVENT_REORDER, "container1");
-  // Remove img1 from container1
-  await SpecialPowers.spawn(browser, [], () => {
-    let doc = content.document;
-    doc.getElementById("container1").removeChild(doc.getElementById("img1"));
-  });
-  await onReorder;
+    let onReorder = waitForEvent(EVENT_REORDER, "container1");
+    // Remove img1 from container1
+    await invokeContentTask(browser, [], () => {
+      let doc = content.document;
+      doc.getElementById("container1").removeChild(doc.getElementById("img1"));
+    });
+    await onReorder;
+
+    tree = {
+      SECTION: [{ GRAPHIC: [] }, { TEXT_LEAF: [] }, { GRAPHIC: [] }],
+    };
+    testAccessibleTree(container1, tree);
 
-  tree = {
-    SECTION: [{ GRAPHIC: [] }, { TEXT_LEAF: [] }, { GRAPHIC: [] }],
-  };
-  testAccessibleTree(container1, tree);
-
-  tree = {
-    SECTION: [{ LINK: [] }, { LINK: [{ GRAPHIC: [] }] }],
-  };
-  testAccessibleTree(container2Parent, tree);
+    tree = {
+      SECTION: [{ LINK: [] }, { LINK: [{ GRAPHIC: [] }] }],
+    };
+    testAccessibleTree(container2Parent, tree);
 
-  onReorder = waitForEvent(EVENT_REORDER, "container2-parent");
-  // Append an img with valid src to container2
-  await SpecialPowers.spawn(browser, [], () => {
-    let doc = content.document;
-    let img = doc.createElement("img");
-    img.setAttribute(
-      "src",
-      "http://example.com/a11y/accessible/tests/mochitest/moz.png"
-    );
-    doc.getElementById("container2").appendChild(img);
-  });
-  await onReorder;
+    onReorder = waitForEvent(EVENT_REORDER, "container2-parent");
+    // Append an img with valid src to container2
+    await invokeContentTask(browser, [], () => {
+      let doc = content.document;
+      let img = doc.createElement("img");
+      img.setAttribute(
+        "src",
+        "http://example.com/a11y/accessible/tests/mochitest/moz.png"
+      );
+      doc.getElementById("container2").appendChild(img);
+    });
+    await onReorder;
 
-  tree = {
-    SECTION: [
-      { LINK: [{ GRAPHIC: [] }] },
-      { TEXT_LEAF: [] },
-      { LINK: [{ GRAPHIC: [] }] },
-    ],
-  };
-  testAccessibleTree(container2Parent, tree);
-});
+    tree = {
+      SECTION: [
+        { LINK: [{ GRAPHIC: [] }] },
+        { TEXT_LEAF: [] },
+        { LINK: [{ GRAPHIC: [] }] },
+      ],
+    };
+    testAccessibleTree(container2Parent, tree);
+  },
+  { iframe: true }
+);