Backed out 2 changesets (bug 864845) for causing bug 1399649.

Backed out changeset c991b71d3642 (bug 864845)
Backed out changeset 9e6a4d96cf76 (bug 864845)
This commit is contained in:
Ryan VanderMeulen 2017-09-13 19:23:12 -04:00
Родитель 006a58c35d
Коммит 3fc86b0be1
21 изменённых файлов: 63 добавлений и 63 удалений

Просмотреть файл

@ -18,14 +18,14 @@ add_task(function* () {
info("Navigate to the second page"); info("Navigate to the second page");
let onMarkupLoaded = waitForMarkupLoaded(inspector); let onMarkupLoaded = waitForMarkupLoaded(inspector);
yield testActor.eval(`location.href="${IFRAME2}"`); yield testActor.eval(`content.location.href="${IFRAME2}"`);
yield onMarkupLoaded; yield onMarkupLoaded;
yield testSecondPage(inspector, view, testActor); yield testSecondPage(inspector, view, testActor);
info("Go back to the first page"); info("Go back to the first page");
onMarkupLoaded = waitForMarkupLoaded(inspector); onMarkupLoaded = waitForMarkupLoaded(inspector);
yield testActor.eval("history.back();"); yield testActor.eval("content.history.back();");
yield onMarkupLoaded; yield onMarkupLoaded;
yield testBackToFirstPage(inspector, view, testActor); yield testBackToFirstPage(inspector, view, testActor);

Просмотреть файл

@ -103,15 +103,15 @@ function waitForMarkupLoaded(inspector) {
function getStyle(testActor, selector, propertyName) { function getStyle(testActor, selector, propertyName) {
return testActor.eval(` return testActor.eval(`
document.querySelector("${selector}") content.document.querySelector("${selector}")
.style.getPropertyValue("${propertyName}"); .style.getPropertyValue("${propertyName}");
`); `);
} }
function setStyle(testActor, selector, propertyName, value) { function setStyle(testActor, selector, propertyName, value) {
return testActor.eval(` return testActor.eval(`
document.querySelector("${selector}") content.document.querySelector("${selector}")
.style.${propertyName} = "${value}"; .style.${propertyName} = "${value}";
`); `);
} }

Просмотреть файл

@ -53,7 +53,7 @@ add_task(function* () {
state.grids[0].highlighted && state.grids[0].highlighted &&
!state.grids[1].highlighted); !state.grids[1].highlighted);
testActor.eval(` testActor.eval(`
document.getElementById("grid2").classList.add("grid"); content.document.getElementById("grid2").classList.add("grid");
`); `);
yield onGridListUpdate; yield onGridListUpdate;

Просмотреть файл

@ -51,7 +51,7 @@ add_task(function* () {
let onHighlighterHidden = highlighters.once("grid-highlighter-hidden"); let onHighlighterHidden = highlighters.once("grid-highlighter-hidden");
onCheckboxChange = waitUntilState(store, state => state.grids.length == 0); onCheckboxChange = waitUntilState(store, state => state.grids.length == 0);
testActor.eval(` testActor.eval(`
document.getElementById("grid").remove(); content.document.getElementById("grid").remove();
`); `);
yield onHighlighterHidden; yield onHighlighterHidden;
yield onCheckboxChange; yield onCheckboxChange;

Просмотреть файл

@ -57,9 +57,9 @@ add_task(function* () {
let onGridOutlineChanged = waitForDOM(doc, ".grid-outline-cell", 4); let onGridOutlineChanged = waitForDOM(doc, ".grid-outline-cell", 4);
testActor.eval(` testActor.eval(`
const div = document.createElement("div"); const div = content.document.createElement("div");
div.textContent = "item 3"; div.textContent = "item 3";
document.querySelector(".container").appendChild(div); content.document.querySelector(".container").appendChild(div);
`); `);
yield onReflow; yield onReflow;

Просмотреть файл

@ -22,7 +22,7 @@ add_task(function* () {
yield selectNode("canvas", inspector); yield selectNode("canvas", inspector);
yield assertCopyImageDataAvailable(inspector); yield assertCopyImageDataAvailable(inspector);
let expectedURL = yield testActor.eval(` let expectedURL = yield testActor.eval(`
document.querySelector(".canvas").toDataURL();`); content.document.querySelector(".canvas").toDataURL();`);
yield triggerCopyImageUrlAndWaitForClipboard(expectedURL, inspector); yield triggerCopyImageUrlAndWaitForClipboard(expectedURL, inspector);
// Check again that the menu isn't available on the DIV (to make sure our // Check again that the menu isn't available on the DIV (to make sure our

Просмотреть файл

@ -18,10 +18,10 @@ const TEST_DATA = [
is(pageNodeFront, selectedNodeFront, "Original element is selected"); is(pageNodeFront, selectedNodeFront, "Original element is selected");
let textNodeName = yield testActor.eval(` let textNodeName = yield testActor.eval(`
document.querySelector("#badMarkup1").nextSibling.nodeName content.document.querySelector("#badMarkup1").nextSibling.nodeName
`); `);
let textNodeData = yield testActor.eval(` 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(textNodeName, "#text", "Sibling is a text element");
is(textNodeData, " hanging", "New text node has expected text content"); is(textNodeData, " hanging", "New text node has expected text content");
@ -36,10 +36,10 @@ const TEST_DATA = [
is(pageNodeFront, selectedNodeFront, "Original element is selected"); is(pageNodeFront, selectedNodeFront, "Original element is selected");
let textNodeName = yield testActor.eval(` let textNodeName = yield testActor.eval(`
document.querySelector("#badMarkup2").nextSibling.nodeName content.document.querySelector("#badMarkup2").nextSibling.nodeName
`); `);
let textNodeData = yield testActor.eval(` 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(textNodeName, "#text", "Sibling is a text element");
is(textNodeData, " hanging", "New text node has expected text content"); is(textNodeData, " hanging", "New text node has expected text content");

Просмотреть файл

@ -121,9 +121,9 @@ function* testHead(inspector, testActor) {
yield onReselected; yield onReselected;
yield onUpdated; yield onUpdated;
is((yield testActor.eval("document.title")), "New Title", is((yield testActor.eval("content.document.title")), "New Title",
"New title has been added"); "New title has been added");
is((yield testActor.eval("window.foo")), undefined, is((yield testActor.eval("content.foo")), undefined,
"Script has not been executed"); "Script has not been executed");
is((yield testActor.getProperty("head", "outerHTML")), headHTML, is((yield testActor.getProperty("head", "outerHTML")), headHTML,
"<head> HTML has been updated"); "<head> HTML has been updated");
@ -133,7 +133,7 @@ function* testHead(inspector, testActor) {
function* testDocumentElement(inspector, testActor) { function* testDocumentElement(inspector, testActor) {
let currentDocElementOuterHMTL = yield testActor.eval( let currentDocElementOuterHMTL = yield testActor.eval(
"document.documentElement.outerHMTL"); "content.document.documentElement.outerHMTL");
let docElementHTML = "<html id=\"updated\" foo=\"bar\"><head>" + let docElementHTML = "<html id=\"updated\" foo=\"bar\"><head>" +
"<title>Updated from document element</title>" + "<title>Updated from document element</title>" +
"<script>window.foo=\"bar\";</script></head><body>" + "<script>window.foo=\"bar\";</script></head><body>" +
@ -145,9 +145,9 @@ function* testDocumentElement(inspector, testActor) {
currentDocElementOuterHMTL); currentDocElementOuterHMTL);
yield onReselected; yield onReselected;
is((yield testActor.eval("document.title")), is((yield testActor.eval("content.document.title")),
"Updated from document element", "New title has been added"); "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"); undefined, "Script has not been executed");
is((yield testActor.getAttribute("html", "id")), is((yield testActor.getAttribute("html", "id")),
"updated", "<html> ID has been updated"); "updated", "<html> ID has been updated");
@ -167,7 +167,7 @@ function* testDocumentElement(inspector, testActor) {
function* testDocumentElement2(inspector, testActor) { function* testDocumentElement2(inspector, testActor) {
let currentDocElementOuterHMTL = yield testActor.eval( let currentDocElementOuterHMTL = yield testActor.eval(
"document.documentElement.outerHMTL"); "content.document.documentElement.outerHMTL");
let docElementHTML = "<html id=\"somethingelse\" class=\"updated\"><head>" + let docElementHTML = "<html id=\"somethingelse\" class=\"updated\"><head>" +
"<title>Updated again from document element</title>" + "<title>Updated again from document element</title>" +
"<script>window.foo=\"bar\";</script></head><body>" + "<script>window.foo=\"bar\";</script></head><body>" +
@ -179,9 +179,9 @@ function* testDocumentElement2(inspector, testActor) {
currentDocElementOuterHMTL); currentDocElementOuterHMTL);
yield onReselected; 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"); "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"); undefined, "Script has not been executed");
is((yield testActor.getAttribute("html", "id")), is((yield testActor.getAttribute("html", "id")),
"somethingelse", "<html> ID has been updated"); "somethingelse", "<html> ID has been updated");

Просмотреть файл

@ -76,10 +76,10 @@ add_task(function* () {
*/ */
function* checkElementIsInViewport(selector, expected, testActor) { function* checkElementIsInViewport(selector, expected, testActor) {
let isInViewport = yield testActor.eval(` let isInViewport = yield testActor.eval(`
let node = document.querySelector("${selector}"); let node = content.document.querySelector("${selector}");
let rect = node.getBoundingClientRect(); let rect = node.getBoundingClientRect();
rect.bottom >= 0 && rect.right >= 0 && 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, is(isInViewport, expected,

Просмотреть файл

@ -104,7 +104,7 @@ const TEST_DATA = [
numMutations: 2, numMutations: 2,
test: function* (testActor) { test: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let node1 = document.querySelector("#node1"); let node1 = content.document.querySelector("#node1");
node1.classList.add("pseudo"); node1.classList.add("pseudo");
`); `);
}, },
@ -119,7 +119,7 @@ const TEST_DATA = [
numMutations: 2, numMutations: 2,
test: function* (testActor) { test: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let node1 = document.querySelector("#node1"); let node1 = content.document.querySelector("#node1");
node1.classList.remove("pseudo"); node1.classList.remove("pseudo");
`); `);
}, },
@ -146,7 +146,7 @@ const TEST_DATA = [
desc: "Adding a second text child", desc: "Adding a second text child",
test: function* (testActor) { test: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let node1 = document.querySelector("#node1"); let node1 = content.document.querySelector("#node1");
let newText = node1.ownerDocument.createTextNode("more"); let newText = node1.ownerDocument.createTextNode("more");
node1.appendChild(newText); node1.appendChild(newText);
`); `);
@ -223,7 +223,7 @@ const TEST_DATA = [
desc: "Removing child nodes", desc: "Removing child nodes",
test: function* (testActor) { test: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let node4 = document.querySelector("#node4"); let node4 = content.document.querySelector("#node4");
while (node4.firstChild) { while (node4.firstChild) {
node4.removeChild(node4.firstChild); node4.removeChild(node4.firstChild);
} }
@ -238,8 +238,8 @@ const TEST_DATA = [
desc: "Appending a child to a different parent", desc: "Appending a child to a different parent",
test: function* (testActor) { test: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let node17 = document.querySelector("#node17"); let node17 = content.document.querySelector("#node17");
let node2 = document.querySelector("#node2"); let node2 = content.document.querySelector("#node2");
node2.appendChild(node17); node2.appendChild(node17);
`); `);
}, },
@ -271,9 +271,9 @@ const TEST_DATA = [
// node19 // node19
test: function* (testActor) { test: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let node18 = document.querySelector("#node18"); let node18 = content.document.querySelector("#node18");
let node20 = document.querySelector("#node20"); let node20 = content.document.querySelector("#node20");
let node1 = document.querySelector("#node1"); let node1 = content.document.querySelector("#node1");
node1.appendChild(node20); node1.appendChild(node20);
node20.appendChild(node18); node20.appendChild(node18);
`); `);

Просмотреть файл

@ -25,9 +25,9 @@ const TEST_DATA = [{
desc: "Adding a new node should flash the new node", desc: "Adding a new node should flash the new node",
mutate: function* (testActor) { mutate: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let newLi = document.createElement("LI"); let newLi = content.document.createElement("LI");
newLi.textContent = "new list item"; newLi.textContent = "new list item";
document.querySelector(".list").appendChild(newLi); content.document.querySelector(".list").appendChild(newLi);
`); `);
}, },
flashedNode: ".list li:nth-child(3)" flashedNode: ".list li:nth-child(3)"
@ -35,7 +35,7 @@ const TEST_DATA = [{
desc: "Removing a node should flash its parent", desc: "Removing a node should flash its parent",
mutate: function* (testActor) { mutate: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let root = document.querySelector(".list"); let root = content.document.querySelector(".list");
root.removeChild(root.lastElementChild); root.removeChild(root.lastElementChild);
`); `);
} }
@ -43,7 +43,7 @@ const TEST_DATA = [{
desc: "Re-appending an existing node should only flash this node", desc: "Re-appending an existing node should only flash this node",
mutate: function* (testActor) { mutate: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let root = document.querySelector(".list"); let root = content.document.querySelector(".list");
root.appendChild(root.firstElementChild); root.appendChild(root.firstElementChild);
`); `);
}, },
@ -72,7 +72,7 @@ const TEST_DATA = [{
attribute: "class", attribute: "class",
mutate: function* (testActor) { mutate: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let root = document.querySelector(".list"); let root = content.document.querySelector(".list");
root.removeAttribute("class"); root.removeAttribute("class");
root.setAttribute("class", "list value-" + Date.now()); root.setAttribute("class", "list value-" + Date.now());
root.setAttribute("class", "list value-" + Date.now()); root.setAttribute("class", "list value-" + Date.now());
@ -85,7 +85,7 @@ const TEST_DATA = [{
desc: "Removing an attribute should flash the node", desc: "Removing an attribute should flash the node",
mutate: function* (testActor) { mutate: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let root = document.querySelector(".list"); let root = content.document.querySelector(".list");
root.removeAttribute("class"); root.removeAttribute("class");
`); `);
} }

Просмотреть файл

@ -15,10 +15,10 @@ const TEST_DATA = [
before: true, before: true,
changeStyle: function* (testActor) { changeStyle: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let div = document.createElement("div"); let div = content.document.createElement("div");
div.id = "new-style"; div.id = "new-style";
div.innerHTML = "<style>#normal-div {display:none;}</style>"; div.innerHTML = "<style>#normal-div {display:none;}</style>";
document.body.appendChild(div); content.document.body.appendChild(div);
`); `);
}, },
after: false after: false
@ -29,7 +29,7 @@ const TEST_DATA = [
before: false, before: false,
changeStyle: function* (testActor) { changeStyle: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
document.getElementById("new-style").remove(); content.document.getElementById("new-style").remove();
`); `);
}, },
after: true after: true
@ -40,7 +40,7 @@ const TEST_DATA = [
before: false, before: false,
changeStyle: function* (testActor) { changeStyle: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
let node = document.querySelector("#display-none"); let node = content.document.querySelector("#display-none");
node.style.display = "block"; node.style.display = "block";
`); `);
}, },
@ -52,8 +52,8 @@ const TEST_DATA = [
before: false, before: false,
changeStyle: function* (testActor) { changeStyle: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
document.querySelector("#hidden-true") content.document.querySelector("#hidden-true")
.removeAttribute("hidden"); .removeAttribute("hidden");
`); `);
}, },
after: true after: true
@ -73,9 +73,9 @@ const TEST_DATA = [
before: false, before: false,
changeStyle: function* (testActor) { changeStyle: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
document.styleSheets[0] content.document.styleSheets[0]
.cssRules[0].style .cssRules[0].style
.setProperty("display", "inline"); .setProperty("display", "inline");
`); `);
}, },
after: true after: true
@ -86,7 +86,7 @@ const TEST_DATA = [
before: true, before: true,
changeStyle: function* (testActor) { changeStyle: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
document.styleSheets[0].insertRule( content.document.styleSheets[0].insertRule(
"#hidden-via-stylesheet {display: none;}", 1); "#hidden-via-stylesheet {display: none;}", 1);
`); `);
}, },
@ -98,10 +98,10 @@ const TEST_DATA = [
before: true, before: true,
changeStyle: function* (testActor) { changeStyle: function* (testActor) {
yield testActor.eval(` yield testActor.eval(`
document.styleSheets[0].insertRule( content.document.styleSheets[0].insertRule(
".a-new-class {display: none;}", 2); ".a-new-class {display: none;}", 2);
document.querySelector("#normal-div") content.document.querySelector("#normal-div")
.classList.add("a-new-class"); .classList.add("a-new-class");
`); `);
}, },
after: false after: false

Просмотреть файл

@ -15,7 +15,7 @@ add_task(function* () {
yield selectNode("#one", inspector); yield selectNode("#one", inspector);
let willNavigate = inspector.target.once("will-navigate"); 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"); info("Waiting for will-navigate");
yield willNavigate; yield willNavigate;

Просмотреть файл

@ -112,7 +112,7 @@ Task.async(function* (selector, inspector, expectFailure = false) {
*/ */
function* getFirstChildNodeValue(selector, testActor) { function* getFirstChildNodeValue(selector, testActor) {
let nodeValue = yield testActor.eval(` let nodeValue = yield testActor.eval(`
document.querySelector("${selector}").firstChild.nodeValue; content.document.querySelector("${selector}").firstChild.nodeValue;
`); `);
return nodeValue; return nodeValue;
} }

Просмотреть файл

@ -37,7 +37,7 @@ add_task(function* () {
let onHighlighterHidden = highlighters.once("grid-highlighter-hidden"); let onHighlighterHidden = highlighters.once("grid-highlighter-hidden");
info("Remove the #grid container in the content page"); info("Remove the #grid container in the content page");
testActor.eval(` testActor.eval(`
document.querySelector("#grid").remove(); content.document.querySelector("#grid").remove();
`); `);
yield onHighlighterHidden; yield onHighlighterHidden;
ok(!highlighters.gridHighlighterShown, "CSS grid highlighter is hidden."); ok(!highlighters.gridHighlighterShown, "CSS grid highlighter is hidden.");

Просмотреть файл

@ -36,7 +36,7 @@ add_task(function* () {
let onHighlighterHidden = highlighters.once("shapes-highlighter-hidden"); let onHighlighterHidden = highlighters.once("shapes-highlighter-hidden");
info("Remove the #shapes container in the content page"); info("Remove the #shapes container in the content page");
testActor.eval(` testActor.eval(`
document.querySelector("#shape").remove(); content.document.querySelector("#shape").remove();
`); `);
yield onHighlighterHidden; yield onHighlighterHidden;
ok(!highlighters.shapesHighlighterShown, "CSS shapes highlighter is hidden."); ok(!highlighters.shapesHighlighterShown, "CSS shapes highlighter is hidden.");

Просмотреть файл

@ -57,8 +57,8 @@ addTab = function (url) {
*/ */
function getStyle(testActor, selector, propName) { function getStyle(testActor, selector, propName) {
return testActor.eval(` return testActor.eval(`
document.querySelector("${selector}") content.document.querySelector("${selector}")
.style.getPropertyValue("${propName}"); .style.getPropertyValue("${propName}");
`); `);
} }

Просмотреть файл

@ -84,7 +84,7 @@ add_task(function* () {
executeSoon(resolve); executeSoon(resolve);
}); });
ok((yield testActor.eval("!!document.documentElement")), ok((yield testActor.eval("!!content.document.documentElement")),
"Document element still alive."); "Document element still alive.");
} }

Просмотреть файл

@ -29,7 +29,7 @@ function runtests()
{ {
is(messages.size, 3, "received the right number of messages."); is(messages.size, 3, "received the right number of messages.");
is(messages.get("test"), "success", "test in frame failed."); 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."); isnot(messages.get("dump"), "success", "parent[\"dump\"] should be the WebIDL property of Window.");
SimpleTest.finish(); SimpleTest.finish();

Просмотреть файл

@ -336,7 +336,7 @@ partial interface Window {
optional DOMString options = "", optional DOMString options = "",
any... extraArguments); any... extraArguments);
[ChromeOnly, Replaceable, Throws, NeedsCallerType] readonly attribute object? content; [Replaceable, Throws, NeedsCallerType] readonly attribute object? content;
[ChromeOnly, Throws, NeedsCallerType] readonly attribute object? __content; [ChromeOnly, Throws, NeedsCallerType] readonly attribute object? __content;

Просмотреть файл

@ -113,7 +113,7 @@ function testScroll(target, stepSize, opt_reportFunc, opt_numSteps) {
} }
function rAF(fn) { function rAF(fn) {
return requestAnimationFrame(fn); return content.requestAnimationFrame(fn);
} }
function P_rAF() { function P_rAF() {