зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
006a58c35d
Коммит
3fc86b0be1
|
@ -18,14 +18,14 @@ add_task(function* () {
|
|||
|
||||
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);
|
||||
|
|
|
@ -103,15 +103,15 @@ function waitForMarkupLoaded(inspector) {
|
|||
|
||||
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}";
|
||||
`);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ add_task(function* () {
|
|||
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;
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ add_task(function* () {
|
|||
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;
|
||||
|
|
|
@ -57,9 +57,9 @@ add_task(function* () {
|
|||
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;
|
||||
|
|
|
@ -22,7 +22,7 @@ add_task(function* () {
|
|||
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
|
||||
|
|
|
@ -18,10 +18,10 @@ const TEST_DATA = [
|
|||
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");
|
||||
|
@ -36,10 +36,10 @@ const TEST_DATA = [
|
|||
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");
|
||||
|
|
|
@ -121,9 +121,9 @@ function* testHead(inspector, testActor) {
|
|||
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");
|
||||
|
@ -133,7 +133,7 @@ function* testHead(inspector, testActor) {
|
|||
|
||||
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>" +
|
||||
|
@ -145,9 +145,9 @@ function* testDocumentElement(inspector, testActor) {
|
|||
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");
|
||||
|
@ -167,7 +167,7 @@ function* testDocumentElement(inspector, testActor) {
|
|||
|
||||
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>" +
|
||||
|
@ -179,9 +179,9 @@ function* testDocumentElement2(inspector, testActor) {
|
|||
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");
|
||||
|
|
|
@ -76,10 +76,10 @@ add_task(function* () {
|
|||
*/
|
||||
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,
|
||||
|
|
|
@ -104,7 +104,7 @@ const TEST_DATA = [
|
|||
numMutations: 2,
|
||||
test: function* (testActor) {
|
||||
yield testActor.eval(`
|
||||
let node1 = document.querySelector("#node1");
|
||||
let node1 = content.document.querySelector("#node1");
|
||||
node1.classList.add("pseudo");
|
||||
`);
|
||||
},
|
||||
|
@ -119,7 +119,7 @@ const TEST_DATA = [
|
|||
numMutations: 2,
|
||||
test: function* (testActor) {
|
||||
yield testActor.eval(`
|
||||
let node1 = document.querySelector("#node1");
|
||||
let node1 = content.document.querySelector("#node1");
|
||||
node1.classList.remove("pseudo");
|
||||
`);
|
||||
},
|
||||
|
@ -146,7 +146,7 @@ const TEST_DATA = [
|
|||
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);
|
||||
`);
|
||||
|
@ -223,7 +223,7 @@ const TEST_DATA = [
|
|||
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);
|
||||
}
|
||||
|
@ -238,8 +238,8 @@ const TEST_DATA = [
|
|||
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);
|
||||
`);
|
||||
},
|
||||
|
@ -271,9 +271,9 @@ const TEST_DATA = [
|
|||
// 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);
|
||||
`);
|
||||
|
|
|
@ -25,9 +25,9 @@ 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)"
|
||||
|
@ -35,7 +35,7 @@ const TEST_DATA = [{
|
|||
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);
|
||||
`);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ const TEST_DATA = [{
|
|||
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);
|
||||
`);
|
||||
},
|
||||
|
@ -72,7 +72,7 @@ const TEST_DATA = [{
|
|||
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());
|
||||
|
@ -85,7 +85,7 @@ const TEST_DATA = [{
|
|||
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");
|
||||
`);
|
||||
}
|
||||
|
|
|
@ -15,10 +15,10 @@ const TEST_DATA = [
|
|||
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
|
||||
|
@ -29,7 +29,7 @@ const TEST_DATA = [
|
|||
before: false,
|
||||
changeStyle: function* (testActor) {
|
||||
yield testActor.eval(`
|
||||
document.getElementById("new-style").remove();
|
||||
content.document.getElementById("new-style").remove();
|
||||
`);
|
||||
},
|
||||
after: true
|
||||
|
@ -40,7 +40,7 @@ const TEST_DATA = [
|
|||
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";
|
||||
`);
|
||||
},
|
||||
|
@ -52,8 +52,8 @@ const TEST_DATA = [
|
|||
before: false,
|
||||
changeStyle: function* (testActor) {
|
||||
yield testActor.eval(`
|
||||
document.querySelector("#hidden-true")
|
||||
.removeAttribute("hidden");
|
||||
content.document.querySelector("#hidden-true")
|
||||
.removeAttribute("hidden");
|
||||
`);
|
||||
},
|
||||
after: true
|
||||
|
@ -73,9 +73,9 @@ const TEST_DATA = [
|
|||
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
|
||||
|
@ -86,7 +86,7 @@ const TEST_DATA = [
|
|||
before: true,
|
||||
changeStyle: function* (testActor) {
|
||||
yield testActor.eval(`
|
||||
document.styleSheets[0].insertRule(
|
||||
content.document.styleSheets[0].insertRule(
|
||||
"#hidden-via-stylesheet {display: none;}", 1);
|
||||
`);
|
||||
},
|
||||
|
@ -98,10 +98,10 @@ const TEST_DATA = [
|
|||
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
|
||||
|
|
|
@ -15,7 +15,7 @@ add_task(function* () {
|
|||
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;
|
||||
|
|
|
@ -112,7 +112,7 @@ Task.async(function* (selector, inspector, expectFailure = false) {
|
|||
*/
|
||||
function* getFirstChildNodeValue(selector, testActor) {
|
||||
let nodeValue = yield testActor.eval(`
|
||||
document.querySelector("${selector}").firstChild.nodeValue;
|
||||
content.document.querySelector("${selector}").firstChild.nodeValue;
|
||||
`);
|
||||
return nodeValue;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ add_task(function* () {
|
|||
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.");
|
||||
|
|
|
@ -36,7 +36,7 @@ add_task(function* () {
|
|||
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.");
|
||||
|
|
|
@ -57,8 +57,8 @@ addTab = function (url) {
|
|||
*/
|
||||
function getStyle(testActor, selector, propName) {
|
||||
return testActor.eval(`
|
||||
document.querySelector("${selector}")
|
||||
.style.getPropertyValue("${propName}");
|
||||
content.document.querySelector("${selector}")
|
||||
.style.getPropertyValue("${propName}");
|
||||
`);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ add_task(function* () {
|
|||
executeSoon(resolve);
|
||||
});
|
||||
|
||||
ok((yield testActor.eval("!!document.documentElement")),
|
||||
ok((yield testActor.eval("!!content.document.documentElement")),
|
||||
"Document element still alive.");
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ 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();
|
||||
|
|
|
@ -336,7 +336,7 @@ partial interface Window {
|
|||
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;
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ function testScroll(target, stepSize, opt_reportFunc, opt_numSteps) {
|
|||
}
|
||||
|
||||
function rAF(fn) {
|
||||
return requestAnimationFrame(fn);
|
||||
return content.requestAnimationFrame(fn);
|
||||
}
|
||||
|
||||
function P_rAF() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче