Backed out 2 changesets (bug 864845) for causing bug 1399649.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 13 Sep 2017 19:23:12 -0400
changeset 430209 c15e2f280729b6503f9455cd4448ab2852eb5806
parent 430208 8645a74bbbd06b67699317df1abf3897db0e43d5
child 430210 39f4a41bb7081296c8ee903c326ced003abdc66d
child 430280 9219c2f933e257c0488028d9659bf7fd1a87dda0
child 430321 db0bc6f63bc429741509ea5d789b71236482530c
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs864845, 1399649
milestone57.0a1
backs outc991b71d36422d8adecfe27268d18c62faa5b63c
9e6a4d96cf76d8cdd17983fe748bfc8936caefec
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
Backed out 2 changesets (bug 864845) for causing bug 1399649. Backed out changeset c991b71d3642 (bug 864845) Backed out changeset 9e6a4d96cf76 (bug 864845)
devtools/client/inspector/boxmodel/test/browser_boxmodel_update-after-navigation.js
devtools/client/inspector/boxmodel/test/head.js
devtools/client/inspector/grids/test/browser_grids_grid-list-on-mutation-element-added.js
devtools/client/inspector/grids/test/browser_grids_grid-list-on-mutation-element-removed.js
devtools/client/inspector/grids/test/browser_grids_grid-outline-updates-on-grid-change.js
devtools/client/inspector/markup/test/browser_markup_copy_image_data.js
devtools/client/inspector/markup/test/browser_markup_html_edit_02.js
devtools/client/inspector/markup/test/browser_markup_html_edit_03.js
devtools/client/inspector/markup/test/browser_markup_keybindings_scrolltonode.js
devtools/client/inspector/markup/test/browser_markup_mutation_01.js
devtools/client/inspector/markup/test/browser_markup_mutation_02.js
devtools/client/inspector/markup/test/browser_markup_node_not_displayed_02.js
devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
devtools/client/inspector/markup/test/head.js
devtools/client/inspector/rules/test/browser_rules_grid-highlighter-on-mutation.js
devtools/client/inspector/rules/test/browser_rules_shapes-toggle_05.js
devtools/client/inspector/rules/test/head.js
devtools/client/inspector/test/browser_inspector_menu-06-other.js
dom/tests/mochitest/bugs/test_bug440572.html
dom/webidl/Window.webidl
testing/talos/talos/pageloader/chrome/tscroll.js
--- a/devtools/client/inspector/boxmodel/test/browser_boxmodel_update-after-navigation.js
+++ b/devtools/client/inspector/boxmodel/test/browser_boxmodel_update-after-navigation.js
@@ -13,24 +13,24 @@ const IFRAME2 = URL_ROOT + "doc_boxmodel
 add_task(function* () {
   yield addTab(IFRAME1);
   let {inspector, view, testActor} = yield openBoxModelView();
 
   yield testFirstPage(inspector, view, testActor);
 
   info("Navigate to the second page");
   let onMarkupLoaded = waitForMarkupLoaded(inspector);
-  yield testActor.eval(`location.href="${IFRAME2}"`);
+  yield testActor.eval(`content.location.href="${IFRAME2}"`);
   yield onMarkupLoaded;
 
   yield testSecondPage(inspector, view, testActor);
 
   info("Go back to the first page");
   onMarkupLoaded = waitForMarkupLoaded(inspector);
-  yield testActor.eval("history.back();");
+  yield testActor.eval("content.history.back();");
   yield onMarkupLoaded;
 
   yield testBackToFirstPage(inspector, view, testActor);
 });
 
 function* testFirstPage(inspector, view, testActor) {
   info("Test that the box model view works on the first page");
 
--- a/devtools/client/inspector/boxmodel/test/head.js
+++ b/devtools/client/inspector/boxmodel/test/head.js
@@ -98,25 +98,25 @@ function waitForMarkupLoaded(inspector) 
   return Promise.all([
     waitForUpdate(inspector),
     inspector.once("markuploaded"),
   ]);
 }
 
 function getStyle(testActor, selector, propertyName) {
   return testActor.eval(`
-    document.querySelector("${selector}")
-            .style.getPropertyValue("${propertyName}");
+    content.document.querySelector("${selector}")
+                    .style.getPropertyValue("${propertyName}");
   `);
 }
 
 function setStyle(testActor, selector, propertyName, value) {
   return testActor.eval(`
-    document.querySelector("${selector}")
-            .style.${propertyName} = "${value}";
+    content.document.querySelector("${selector}")
+                    .style.${propertyName} = "${value}";
   `);
 }
 
 /**
  * The box model doesn't participate in the inspector's update mechanism, so simply
  * calling the default selectNode isn't enough to guarantee that the box model view has
  * finished updating. We also need to wait for the "boxmodel-view-updated" event.
  */
--- a/devtools/client/inspector/grids/test/browser_grids_grid-list-on-mutation-element-added.js
+++ b/devtools/client/inspector/grids/test/browser_grids_grid-list-on-mutation-element-added.js
@@ -48,17 +48,17 @@ add_task(function* () {
   ok(highlighters.gridHighlighterShown, "CSS grid highlighter is shown.");
 
   info("Adding the #grid2 container in the content page.");
   let onGridListUpdate = waitUntilState(store, state =>
     state.grids.length == 2 &&
     state.grids[0].highlighted &&
     !state.grids[1].highlighted);
   testActor.eval(`
-    document.getElementById("grid2").classList.add("grid");
+    content.document.getElementById("grid2").classList.add("grid");
   `);
   yield onGridListUpdate;
 
   info("Checking the new Grid Inspector state.");
   is(gridList.childNodes.length, 2, "Two grid containers are listed.");
   ok(highlighters.highlighters[HIGHLIGHTER_TYPE],
     "CSS grid highlighter is created in the highlighters overlay.");
   ok(highlighters.gridHighlighterShown, "CSS grid highlighter is shown.");
--- a/devtools/client/inspector/grids/test/browser_grids_grid-list-on-mutation-element-removed.js
+++ b/devtools/client/inspector/grids/test/browser_grids_grid-list-on-mutation-element-removed.js
@@ -46,17 +46,17 @@ add_task(function* () {
   ok(highlighters.highlighters[HIGHLIGHTER_TYPE],
     "CSS grid highlighter is created in the highlighters overlay.");
   ok(highlighters.gridHighlighterShown, "CSS grid highlighter is shown.");
 
   info("Removing the #grid container in the content page.");
   let onHighlighterHidden = highlighters.once("grid-highlighter-hidden");
   onCheckboxChange = waitUntilState(store, state => state.grids.length == 0);
   testActor.eval(`
-    document.getElementById("grid").remove();
+    content.document.getElementById("grid").remove();
   `);
   yield onHighlighterHidden;
   yield onCheckboxChange;
 
   info("Checking the CSS grid highlighter is not shown.");
   ok(!highlighters.gridHighlighterShown, "No CSS grid highlighter is shown.");
   let noGridList = doc.querySelector(".grid-pane .devtools-sidepanel-no-result");
   ok(noGridList, "The message no grid containers is displayed.");
--- a/devtools/client/inspector/grids/test/browser_grids_grid-outline-updates-on-grid-change.js
+++ b/devtools/client/inspector/grids/test/browser_grids_grid-outline-updates-on-grid-change.js
@@ -52,19 +52,19 @@ add_task(function* () {
         resolve();
       }
     };
     inspector.reflowTracker.trackReflows(listener, listener.callback);
   });
   let onGridOutlineChanged = waitForDOM(doc, ".grid-outline-cell", 4);
 
   testActor.eval(`
-    const div = document.createElement("div");
+    const div = content.document.createElement("div");
     div.textContent = "item 3";
-    document.querySelector(".container").appendChild(div);
+    content.document.querySelector(".container").appendChild(div);
   `);
 
   yield onReflow;
   elements = yield onGridOutlineChanged;
 
   info("Checking the grid outline is correct.");
   is(elements.length, 4, "Grid outline was changed.");
 });
--- a/devtools/client/inspector/markup/test/browser_markup_copy_image_data.js
+++ b/devtools/client/inspector/markup/test/browser_markup_copy_image_data.js
@@ -17,17 +17,17 @@ add_task(function* () {
   yield selectNode("img", inspector);
   yield assertCopyImageDataAvailable(inspector);
   let expectedSrc = yield testActor.getAttribute("img", "src");
   yield triggerCopyImageUrlAndWaitForClipboard(expectedSrc, inspector);
 
   yield selectNode("canvas", inspector);
   yield assertCopyImageDataAvailable(inspector);
   let expectedURL = yield testActor.eval(`
-    document.querySelector(".canvas").toDataURL();`);
+    content.document.querySelector(".canvas").toDataURL();`);
   yield triggerCopyImageUrlAndWaitForClipboard(expectedURL, inspector);
 
   // Check again that the menu isn't available on the DIV (to make sure our
   // menu updating mechanism works)
   yield selectNode("div", inspector);
   yield assertCopyImageDataNotAvailable(inspector);
 });
 
--- a/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js
+++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js
@@ -13,38 +13,38 @@ const TEST_DATA = [
   {
     selector: "#badMarkup1",
     oldHTML: "<div id=\"badMarkup1\">badMarkup1</div>",
     newHTML: "<div id=\"badMarkup1\">badMarkup1</div> hanging</div>",
     validate: function* ({pageNodeFront, selectedNodeFront, testActor}) {
       is(pageNodeFront, selectedNodeFront, "Original element is selected");
 
       let textNodeName = yield testActor.eval(`
-        document.querySelector("#badMarkup1").nextSibling.nodeName
+        content.document.querySelector("#badMarkup1").nextSibling.nodeName
       `);
       let textNodeData = yield testActor.eval(`
-        document.querySelector("#badMarkup1").nextSibling.data
+        content.document.querySelector("#badMarkup1").nextSibling.data
       `);
       is(textNodeName, "#text", "Sibling is a text element");
       is(textNodeData, " hanging", "New text node has expected text content");
     }
   },
   {
     selector: "#badMarkup2",
     oldHTML: "<div id=\"badMarkup2\">badMarkup2</div>",
     newHTML: "<div id=\"badMarkup2\">badMarkup2</div> hanging<div></div>" +
              "</div></div></body>",
     validate: function* ({pageNodeFront, selectedNodeFront, testActor}) {
       is(pageNodeFront, selectedNodeFront, "Original element is selected");
 
       let textNodeName = yield testActor.eval(`
-        document.querySelector("#badMarkup2").nextSibling.nodeName
+        content.document.querySelector("#badMarkup2").nextSibling.nodeName
       `);
       let textNodeData = yield testActor.eval(`
-        document.querySelector("#badMarkup2").nextSibling.data
+        content.document.querySelector("#badMarkup2").nextSibling.data
       `);
       is(textNodeName, "#text", "Sibling is a text element");
       is(textNodeData, " hanging", "New text node has expected text content");
     }
   },
   {
     selector: "#badMarkup3",
     oldHTML: "<div id=\"badMarkup3\">badMarkup3</div>",
--- a/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js
+++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js
@@ -116,43 +116,43 @@ function* testHead(inspector, testActor)
 
   let onUpdated = inspector.once("inspector-updated");
   let onReselected = inspector.markup.once("reselectedonremoved");
   yield inspector.markup.updateNodeOuterHTML(headFront, headHTML,
                                              currentHeadHTML);
   yield onReselected;
   yield onUpdated;
 
-  is((yield testActor.eval("document.title")), "New Title",
+  is((yield testActor.eval("content.document.title")), "New Title",
      "New title has been added");
-  is((yield testActor.eval("window.foo")), undefined,
+  is((yield testActor.eval("content.foo")), undefined,
      "Script has not been executed");
   is((yield testActor.getProperty("head", "outerHTML")), headHTML,
      "<head> HTML has been updated");
   is((yield testActor.getNumberOfElementMatches("body")), 1,
      "no extra <body>s have been added");
 }
 
 function* testDocumentElement(inspector, testActor) {
   let currentDocElementOuterHMTL = yield testActor.eval(
-    "document.documentElement.outerHMTL");
+    "content.document.documentElement.outerHMTL");
   let docElementHTML = "<html id=\"updated\" foo=\"bar\"><head>" +
                        "<title>Updated from document element</title>" +
                        "<script>window.foo=\"bar\";</script></head><body>" +
                        "<p>Hello</p></body></html>";
   let docElementFront = yield inspector.markup.walker.documentElement();
 
   let onReselected = inspector.markup.once("reselectedonremoved");
   yield inspector.markup.updateNodeOuterHTML(docElementFront, docElementHTML,
     currentDocElementOuterHMTL);
   yield onReselected;
 
-  is((yield testActor.eval("document.title")),
+  is((yield testActor.eval("content.document.title")),
      "Updated from document element", "New title has been added");
-  is((yield testActor.eval("window.foo")),
+  is((yield testActor.eval("content.foo")),
      undefined, "Script has not been executed");
   is((yield testActor.getAttribute("html", "id")),
      "updated", "<html> ID has been updated");
   is((yield testActor.getAttribute("html", "class")),
      null, "<html> class has been updated");
   is((yield testActor.getAttribute("html", "foo")),
      "bar", "<html> attribute has been updated");
   is((yield testActor.getProperty("html", "outerHTML")),
@@ -162,31 +162,31 @@ function* testDocumentElement(inspector,
   is((yield testActor.getNumberOfElementMatches("body")),
      1, "no extra <body>s have been added");
   is((yield testActor.getProperty("body", "textContent")),
      "Hello", "document.body.textContent has been updated");
 }
 
 function* testDocumentElement2(inspector, testActor) {
   let currentDocElementOuterHMTL = yield testActor.eval(
-    "document.documentElement.outerHMTL");
+    "content.document.documentElement.outerHMTL");
   let docElementHTML = "<html id=\"somethingelse\" class=\"updated\"><head>" +
                        "<title>Updated again from document element</title>" +
                        "<script>window.foo=\"bar\";</script></head><body>" +
                        "<p>Hello again</p></body></html>";
   let docElementFront = yield inspector.markup.walker.documentElement();
 
   let onReselected = inspector.markup.once("reselectedonremoved");
   inspector.markup.updateNodeOuterHTML(docElementFront, docElementHTML,
     currentDocElementOuterHMTL);
   yield onReselected;
 
-  is((yield testActor.eval("document.title")),
+  is((yield testActor.eval("content.document.title")),
      "Updated again from document element", "New title has been added");
-  is((yield testActor.eval("window.foo")),
+  is((yield testActor.eval("content.foo")),
      undefined, "Script has not been executed");
   is((yield testActor.getAttribute("html", "id")),
      "somethingelse", "<html> ID has been updated");
   is((yield testActor.getAttribute("html", "class")),
      "updated", "<html> class has been updated");
   is((yield testActor.getAttribute("html", "foo")),
      null, "<html> attribute has been removed");
   is((yield testActor.getProperty("html", "outerHTML")),
--- a/devtools/client/inspector/markup/test/browser_markup_keybindings_scrolltonode.js
+++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_scrolltonode.js
@@ -71,17 +71,17 @@ add_task(function* () {
  * @param {Boolean} expected
  *        true if the element is expected to be in the viewport, false otherwise
  * @param {TestActor} testActor
  *        current test actor
  * @return {Promise} promise
  */
 function* checkElementIsInViewport(selector, expected, testActor) {
   let isInViewport = yield testActor.eval(`
-    let node = document.querySelector("${selector}");
+    let node = content.document.querySelector("${selector}");
     let rect = node.getBoundingClientRect();
     rect.bottom >= 0 && rect.right >= 0 &&
-      rect.top <= window.innerHeight && rect.left <= window.innerWidth;
+      rect.top <= content.innerHeight && rect.left <= content.innerWidth;
   `);
 
   is(isInViewport, expected,
     selector + " in the viewport: expected to be " + expected);
 }
--- a/devtools/client/inspector/markup/test/browser_markup_mutation_01.js
+++ b/devtools/client/inspector/markup/test/browser_markup_mutation_01.js
@@ -99,32 +99,32 @@ const TEST_DATA = [
       ok(newAttrContainer.beforeMutationFlag, "attribute-container same as earlier");
     }
   },
   {
     desc: "Adding ::after element",
     numMutations: 2,
     test: function* (testActor) {
       yield testActor.eval(`
-        let node1 = document.querySelector("#node1");
+        let node1 = content.document.querySelector("#node1");
         node1.classList.add("pseudo");
       `);
     },
     check: function* (inspector) {
       let {children} = yield getContainerForSelector("#node1", inspector);
       is(children.childNodes.length, 2,
         "Node1 now has 2 children (text child and ::after");
     }
   },
   {
     desc: "Removing ::after element",
     numMutations: 2,
     test: function* (testActor) {
       yield testActor.eval(`
-        let node1 = document.querySelector("#node1");
+        let node1 = content.document.querySelector("#node1");
         node1.classList.remove("pseudo");
       `);
     },
     check: function* (inspector) {
       let container = yield getContainerForSelector("#node1", inspector);
       ok(container.inlineTextChild, "Has single text child.");
     }
   },
@@ -141,17 +141,17 @@ const TEST_DATA = [
       is(container.editor.elt.querySelector(".text").textContent.trim(),
          "newtext", "Single text child editor updated.");
     }
   },
   {
     desc: "Adding a second text child",
     test: function* (testActor) {
       yield testActor.eval(`
-        let node1 = document.querySelector("#node1");
+        let node1 = content.document.querySelector("#node1");
         let newText = node1.ownerDocument.createTextNode("more");
         node1.appendChild(newText);
       `);
     },
     check: function* (inspector) {
       let container = yield getContainerForSelector("#node1", inspector);
       ok(!container.inlineTextChild, "Does not have single text child.");
       ok(container.canExpand, "Can expand container with child nodes.");
@@ -218,33 +218,33 @@ const TEST_DATA = [
       is(container.children.querySelector(".text").textContent.trim(), "foo",
         "The span's textcontent is correct");
     }
   },
   {
     desc: "Removing child nodes",
     test: function* (testActor) {
       yield testActor.eval(`
-        let node4 = document.querySelector("#node4");
+        let node4 = content.document.querySelector("#node4");
         while (node4.firstChild) {
           node4.removeChild(node4.firstChild);
         }
       `);
     },
     check: function* (inspector) {
       let {children} = yield getContainerForSelector("#node4", inspector);
       is(children.innerHTML, "", "Children have been removed");
     }
   },
   {
     desc: "Appending a child to a different parent",
     test: function* (testActor) {
       yield testActor.eval(`
-        let node17 = document.querySelector("#node17");
-        let node2 = document.querySelector("#node2");
+        let node17 = content.document.querySelector("#node17");
+        let node2 = content.document.querySelector("#node2");
         node2.appendChild(node17);
       `);
     },
     check: function* (inspector) {
       let {children} = yield getContainerForSelector("#node16", inspector);
       is(children.innerHTML, "",
          "Node17 has been removed from its node16 parent");
 
@@ -266,19 +266,19 @@ const TEST_DATA = [
     // body
     //   node1
     //     node20
     //      node21
     //      node18
     //        node19
     test: function* (testActor) {
       yield testActor.eval(`
-        let node18 = document.querySelector("#node18");
-        let node20 = document.querySelector("#node20");
-        let node1 = document.querySelector("#node1");
+        let node18 = content.document.querySelector("#node18");
+        let node20 = content.document.querySelector("#node20");
+        let node1 = content.document.querySelector("#node1");
         node1.appendChild(node20);
         node20.appendChild(node18);
       `);
     },
     check: function* (inspector) {
       yield inspector.markup.expandAll();
 
       let {children} = yield getContainerForSelector("#node1", inspector);
--- a/devtools/client/inspector/markup/test/browser_markup_mutation_02.js
+++ b/devtools/client/inspector/markup/test/browser_markup_mutation_02.js
@@ -20,35 +20,35 @@ const TEST_URL = URL_ROOT + "doc_markup_
 //   flash instead of the whole node
 // - flashedNode: [optional] the css selector of the node that is expected to
 //   flash in the markup-view as a result of the mutation.
 //   If missing, the rootNode (".list") will be expected to flash
 const TEST_DATA = [{
   desc: "Adding a new node should flash the new node",
   mutate: function* (testActor) {
     yield testActor.eval(`
-      let newLi = document.createElement("LI");
+      let newLi = content.document.createElement("LI");
       newLi.textContent = "new list item";
-      document.querySelector(".list").appendChild(newLi);
+      content.document.querySelector(".list").appendChild(newLi);
     `);
   },
   flashedNode: ".list li:nth-child(3)"
 }, {
   desc: "Removing a node should flash its parent",
   mutate: function* (testActor) {
     yield testActor.eval(`
-      let root = document.querySelector(".list");
+      let root = content.document.querySelector(".list");
       root.removeChild(root.lastElementChild);
     `);
   }
 }, {
   desc: "Re-appending an existing node should only flash this node",
   mutate: function* (testActor) {
     yield testActor.eval(`
-      let root = document.querySelector(".list");
+      let root = content.document.querySelector(".list");
       root.appendChild(root.firstElementChild);
     `);
   },
   flashedNode: ".list .item:last-child"
 }, {
   desc: "Adding an attribute should flash the attribute",
   attribute: "test-name",
   mutate: function* (testActor) {
@@ -67,30 +67,30 @@ const TEST_DATA = [{
   mutate: function* (testActor) {
     yield testActor.setAttribute(".list", "class", "list value-" + Date.now());
   }
 }, {
   desc: "Multiple changes to an attribute should flash the attribute",
   attribute: "class",
   mutate: function* (testActor) {
     yield testActor.eval(`
-      let root = document.querySelector(".list");
+      let root = content.document.querySelector(".list");
       root.removeAttribute("class");
       root.setAttribute("class", "list value-" + Date.now());
       root.setAttribute("class", "list value-" + Date.now());
       root.removeAttribute("class");
       root.setAttribute("class", "list value-" + Date.now());
       root.setAttribute("class", "list value-" + Date.now());
     `);
   }
 }, {
   desc: "Removing an attribute should flash the node",
   mutate: function* (testActor) {
     yield testActor.eval(`
-      let root = document.querySelector(".list");
+      let root = content.document.querySelector(".list");
       root.removeAttribute("class");
     `);
   }
 }];
 
 add_task(function* () {
   let {inspector, testActor} = yield openInspectorForURL(TEST_URL);
 
--- a/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_02.js
+++ b/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_02.js
@@ -10,55 +10,55 @@
 const TEST_URL = URL_ROOT + "doc_markup_not_displayed.html";
 const TEST_DATA = [
   {
     desc: "Hiding a node by creating a new stylesheet",
     selector: "#normal-div",
     before: true,
     changeStyle: function* (testActor) {
       yield testActor.eval(`
-        let div = document.createElement("div");
+        let div = content.document.createElement("div");
         div.id = "new-style";
         div.innerHTML = "<style>#normal-div {display:none;}</style>";
-        document.body.appendChild(div);
+        content.document.body.appendChild(div);
       `);
     },
     after: false
   },
   {
     desc: "Showing a node by deleting an existing stylesheet",
     selector: "#normal-div",
     before: false,
     changeStyle: function* (testActor) {
       yield testActor.eval(`
-        document.getElementById("new-style").remove();
+        content.document.getElementById("new-style").remove();
       `);
     },
     after: true
   },
   {
     desc: "Hiding a node by changing its style property",
     selector: "#display-none",
     before: false,
     changeStyle: function* (testActor) {
       yield testActor.eval(`
-        let node = document.querySelector("#display-none");
+        let node = content.document.querySelector("#display-none");
         node.style.display = "block";
       `);
     },
     after: true
   },
   {
     desc: "Showing a node by removing its hidden attribute",
     selector: "#hidden-true",
     before: false,
     changeStyle: function* (testActor) {
       yield testActor.eval(`
-        document.querySelector("#hidden-true")
-                .removeAttribute("hidden");
+        content.document.querySelector("#hidden-true")
+                        .removeAttribute("hidden");
       `);
     },
     after: true
   },
   {
     desc: "Hiding a node by adding a hidden attribute",
     selector: "#hidden-true",
     before: true,
@@ -68,45 +68,45 @@ const TEST_DATA = [
     after: false
   },
   {
     desc: "Showing a node by changin a stylesheet's rule",
     selector: "#hidden-via-stylesheet",
     before: false,
     changeStyle: function* (testActor) {
       yield testActor.eval(`
-        document.styleSheets[0]
-                .cssRules[0].style
-                .setProperty("display", "inline");
+        content.document.styleSheets[0]
+                        .cssRules[0].style
+                        .setProperty("display", "inline");
       `);
     },
     after: true
   },
   {
     desc: "Hiding a node by adding a new rule to a stylesheet",
     selector: "#hidden-via-stylesheet",
     before: true,
     changeStyle: function* (testActor) {
       yield testActor.eval(`
-        document.styleSheets[0].insertRule(
+        content.document.styleSheets[0].insertRule(
           "#hidden-via-stylesheet {display: none;}", 1);
       `);
     },
     after: false
   },
   {
     desc: "Hiding a node by adding a class that matches an existing rule",
     selector: "#normal-div",
     before: true,
     changeStyle: function* (testActor) {
       yield testActor.eval(`
-        document.styleSheets[0].insertRule(
+        content.document.styleSheets[0].insertRule(
           ".a-new-class {display: none;}", 2);
-        document.querySelector("#normal-div")
-                .classList.add("a-new-class");
+        content.document.querySelector("#normal-div")
+                        .classList.add("a-new-class");
       `);
     },
     after: false
   }
 ];
 
 add_task(function* () {
   let {inspector, testActor} = yield openInspectorForURL(TEST_URL);
--- a/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
+++ b/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
@@ -10,17 +10,17 @@ const URL_2 = URL_ROOT + "doc_markup_upd
 
 add_task(function* () {
   let {inspector, testActor} = yield openInspectorForURL(URL_1);
 
   assertMarkupViewIsLoaded();
   yield selectNode("#one", inspector);
 
   let willNavigate = inspector.target.once("will-navigate");
-  yield testActor.eval(`window.location = "${URL_2}"`);
+  yield testActor.eval(`content.location = "${URL_2}"`);
 
   info("Waiting for will-navigate");
   yield willNavigate;
 
   info("Navigation to page 2 has started, the inspector should be empty");
   assertMarkupViewIsEmpty();
 
   info("Waiting for new-root");
--- a/devtools/client/inspector/markup/test/head.js
+++ b/devtools/client/inspector/markup/test/head.js
@@ -107,17 +107,17 @@ Task.async(function* (selector, inspecto
  * Retrieve the nodeValue for the firstChild of a provided selector on the content page.
  *
  * @param {String} selector
  * @param {TestActorFront} testActor The current TestActorFront instance.
  * @return {String} the nodeValue of the first
  */
 function* getFirstChildNodeValue(selector, testActor) {
   let nodeValue = yield testActor.eval(`
-    document.querySelector("${selector}").firstChild.nodeValue;
+    content.document.querySelector("${selector}").firstChild.nodeValue;
   `);
   return nodeValue;
 }
 
 /**
  * Using the markupview's _waitForChildren function, wait for all queued
  * children updates to be handled.
  * @param {InspectorPanel} inspector The instance of InspectorPanel currently
--- a/devtools/client/inspector/rules/test/browser_rules_grid-highlighter-on-mutation.js
+++ b/devtools/client/inspector/rules/test/browser_rules_grid-highlighter-on-mutation.js
@@ -32,13 +32,13 @@ add_task(function* () {
   let onHighlighterShown = highlighters.once("grid-highlighter-shown");
   gridToggle.click();
   yield onHighlighterShown;
   ok(highlighters.gridHighlighterShown, "CSS grid highlighter is shown.");
 
   let onHighlighterHidden = highlighters.once("grid-highlighter-hidden");
   info("Remove the #grid container in the content page");
   testActor.eval(`
-    document.querySelector("#grid").remove();
+    content.document.querySelector("#grid").remove();
   `);
   yield onHighlighterHidden;
   ok(!highlighters.gridHighlighterShown, "CSS grid highlighter is hidden.");
 });
--- a/devtools/client/inspector/rules/test/browser_rules_shapes-toggle_05.js
+++ b/devtools/client/inspector/rules/test/browser_rules_shapes-toggle_05.js
@@ -31,13 +31,13 @@ add_task(function* () {
   let onHighlighterShown = highlighters.once("shapes-highlighter-shown");
   shapeToggle.click();
   yield onHighlighterShown;
   ok(highlighters.shapesHighlighterShown, "CSS shapes highlighter is shown.");
 
   let onHighlighterHidden = highlighters.once("shapes-highlighter-hidden");
   info("Remove the #shapes container in the content page");
   testActor.eval(`
-    document.querySelector("#shape").remove();
+    content.document.querySelector("#shape").remove();
   `);
   yield onHighlighterHidden;
   ok(!highlighters.shapesHighlighterShown, "CSS shapes highlighter is hidden.");
 });
--- a/devtools/client/inspector/rules/test/head.js
+++ b/devtools/client/inspector/rules/test/head.js
@@ -52,18 +52,18 @@ addTab = function (url) {
  * @param {TestActor} testActor
  * @param {String} selector
  *        The selector used to obtain the element.
  * @param {String} name
  *        name of the property.
  */
 function getStyle(testActor, selector, propName) {
   return testActor.eval(`
-    document.querySelector("${selector}")
-            .style.getPropertyValue("${propName}");
+    content.document.querySelector("${selector}")
+                    .style.getPropertyValue("${propName}");
   `);
 }
 
 /**
  * When a tooltip is closed, this ends up "commiting" the value changed within
  * the tooltip (e.g. the color in case of a colorpicker) which, in turn, ends up
  * setting the value of the corresponding css property in the rule-view.
  * Use this function to close the tooltip and make sure the test waits for the
--- a/devtools/client/inspector/test/browser_inspector_menu-06-other.js
+++ b/devtools/client/inspector/test/browser_inspector_menu-06-other.js
@@ -79,17 +79,17 @@ add_task(function* () {
     let allMenuItems = openContextMenuAndGetAllItems(inspector);
     let deleteNode = allMenuItems.find(item => item.id === "node-menu-delete");
     deleteNode.click();
 
     yield new Promise(resolve => {
       executeSoon(resolve);
     });
 
-    ok((yield testActor.eval("!!document.documentElement")),
+    ok((yield testActor.eval("!!content.document.documentElement")),
        "Document element still alive.");
   }
 
   function* testScrollIntoView() {
     // Follow up bug to add this test - https://bugzilla.mozilla.org/show_bug.cgi?id=1154107
     todo(false, "Verify that node is scrolled into the viewport.");
   }
 });
--- a/dom/tests/mochitest/bugs/test_bug440572.html
+++ b/dom/tests/mochitest/bugs/test_bug440572.html
@@ -24,17 +24,17 @@ function receiveMessage(e)
 }
 
 window.addEventListener("message", receiveMessage);
 
 function runtests()
 {
   is(messages.size, 3, "received the right number of messages.");
   is(messages.get("test"), "success", "test in frame failed.");
-  is(messages.get("content"), "success", "parent[\"content\"] should be the subframe named 'content'");
+  isnot(messages.get("content"), "success", "parent[\"content\"] should be the WebIDL property of Window.");
   isnot(messages.get("dump"), "success", "parent[\"dump\"] should be the WebIDL property of Window.");
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 </script>
 <br>
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -331,17 +331,17 @@ partial interface Window {
    * arguments, plus any additional arguments are passed on as
    * arguments on the dialog's window object (window.arguments).
    */
   [Throws, ChromeOnly, UnsafeInPrerendering] WindowProxy? openDialog(optional DOMString url = "",
                                                                    optional DOMString name = "",
                                                                    optional DOMString options = "",
                                                                    any... extraArguments);
 
-  [ChromeOnly, Replaceable, Throws, NeedsCallerType] readonly attribute object? content;
+  [Replaceable, Throws, NeedsCallerType] readonly attribute object? content;
 
   [ChromeOnly, Throws, NeedsCallerType] readonly attribute object? __content;
 
   [Throws, ChromeOnly] any getInterface(IID iid);
 
   /**
    * Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
    */
--- a/testing/talos/talos/pageloader/chrome/tscroll.js
+++ b/testing/talos/talos/pageloader/chrome/tscroll.js
@@ -108,17 +108,17 @@ function testScroll(target, stepSize, op
     return function() {
       return new Promise(function(resolve) {
         setTimeout(resolve, ms);
       });
     };
   }
 
   function rAF(fn) {
-    return requestAnimationFrame(fn);
+    return content.requestAnimationFrame(fn);
   }
 
   function P_rAF() {
     return new Promise(function(resolve) {
       rAF(resolve);
     });
   }