зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset dcbdfb3fdaf2 (bug 1258628) for eslint failure
This commit is contained in:
Родитель
4514045d96
Коммит
97a726afc2
|
@ -204,7 +204,6 @@ const PropertiesView = createClass({
|
|||
},
|
||||
enableInput,
|
||||
expandableStrings,
|
||||
useQuotes: false,
|
||||
expandedNodes: this.getExpandedNodes(object),
|
||||
onFilter: (props) => this.onFilter(props, sectionNames),
|
||||
renderRow: renderRow || this.renderRowWithEditor,
|
||||
|
|
|
@ -30,31 +30,31 @@ add_task(function* () {
|
|||
EventUtils.sendMouseEvent({ type: "click" },
|
||||
document.querySelector("#params-tab"));
|
||||
yield wait;
|
||||
testParamsTab1("a", '', '{ "foo": "bar" }', '');
|
||||
testParamsTab1("a", '""', '{ "foo": "bar" }', '""');
|
||||
|
||||
wait = waitForDOM(document, "#params-panel .tree-section", 2);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
document.querySelectorAll(".request-list-item")[1]);
|
||||
yield wait;
|
||||
testParamsTab1("a", 'b', '{ "foo": "bar" }', '');
|
||||
testParamsTab1("a", '"b"', '{ "foo": "bar" }', '""');
|
||||
|
||||
wait = waitForDOM(document, "#params-panel .tree-section", 2);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
document.querySelectorAll(".request-list-item")[2]);
|
||||
yield wait;
|
||||
testParamsTab1("a", 'b', "?foo", 'bar');
|
||||
testParamsTab1("a", '"b"', "?foo", '"bar"');
|
||||
|
||||
wait = waitForDOM(document, "#params-panel tr:not(.tree-section).treeRow", 2);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
document.querySelectorAll(".request-list-item")[3]);
|
||||
yield wait;
|
||||
testParamsTab2("a", '', '{ "foo": "bar" }', "js");
|
||||
testParamsTab2("a", '""', '{ "foo": "bar" }', "js");
|
||||
|
||||
wait = waitForDOM(document, "#params-panel tr:not(.tree-section).treeRow", 2);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
document.querySelectorAll(".request-list-item")[4]);
|
||||
yield wait;
|
||||
testParamsTab2("a", 'b', '{ "foo": "bar" }', "js");
|
||||
testParamsTab2("a", '"b"', '{ "foo": "bar" }', "js");
|
||||
|
||||
// Wait for all tree sections and editor updated by react
|
||||
let waitSections = waitForDOM(document, "#params-panel .tree-section", 2);
|
||||
|
@ -64,7 +64,7 @@ add_task(function* () {
|
|||
let [, editorFrames] = yield Promise.all([waitSections, waitEditor]);
|
||||
yield once(editorFrames[0], "DOMContentLoaded");
|
||||
yield waitForDOM(editorFrames[0].contentDocument, ".CodeMirror-code");
|
||||
testParamsTab2("a", 'b', "?foo=bar", "text");
|
||||
testParamsTab2("a", '"b"', "?foo=bar", "text");
|
||||
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
document.querySelectorAll(".request-list-item")[6]);
|
||||
|
|
|
@ -228,7 +228,7 @@ add_task(function* () {
|
|||
is(labels[0].textContent, "greeting",
|
||||
"The first json property name was incorrect.");
|
||||
is(values[0].textContent,
|
||||
"Hello JSON!", "The first json property value was incorrect.");
|
||||
"\"Hello JSON!\"", "The first json property value was incorrect.");
|
||||
break;
|
||||
}
|
||||
case "html": {
|
||||
|
|
|
@ -56,7 +56,7 @@ add_task(function* () {
|
|||
|
||||
is(labels[0].textContent, "greeting",
|
||||
"The first json property name was incorrect.");
|
||||
is(values[0].textContent, "This is a base 64 string.",
|
||||
is(values[0].textContent, "\"This is a base 64 string.\"",
|
||||
"The first json property value was incorrect.");
|
||||
|
||||
yield teardown(monitor);
|
||||
|
|
|
@ -80,7 +80,7 @@ add_task(function* () {
|
|||
|
||||
is(labels[0].textContent, "greeting",
|
||||
"The first json property name was incorrect.");
|
||||
is(values[0].textContent, "Hello oddly-named JSON!",
|
||||
is(values[0].textContent, "\"Hello oddly-named JSON!\"",
|
||||
"The first json property value was incorrect.");
|
||||
}
|
||||
});
|
||||
|
|
|
@ -81,7 +81,7 @@ add_task(function* () {
|
|||
|
||||
is(labels[0].textContent, "greeting",
|
||||
"The first json property name was incorrect.");
|
||||
is(values[0].textContent, "Hello third-party JSON!",
|
||||
is(values[0].textContent, "\"Hello third-party JSON!\"",
|
||||
"The first json property value was incorrect.");
|
||||
}
|
||||
});
|
||||
|
|
|
@ -64,14 +64,14 @@ add_task(function* () {
|
|||
document.querySelector("#response-tab"));
|
||||
yield wait;
|
||||
|
||||
testResponseTab("$_0123Fun", "Hello JSONP!");
|
||||
testResponseTab("$_0123Fun", "\"Hello JSONP!\"");
|
||||
|
||||
wait = waitForDOM(document, "#response-panel .tree-section");
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
document.querySelectorAll(".request-list-item")[1]);
|
||||
yield wait;
|
||||
|
||||
testResponseTab("$_4567Sad", "Hello weird JSONP!");
|
||||
testResponseTab("$_4567Sad", "\"Hello weird JSONP!\"");
|
||||
|
||||
yield teardown(monitor);
|
||||
|
||||
|
|
|
@ -115,19 +115,20 @@ add_task(function* () {
|
|||
.querySelectorAll("tr:not(.tree-section) .treeValueCell .objectBox");
|
||||
|
||||
is(labels[0].textContent, "foo", "The first query param name was incorrect.");
|
||||
is(values[0].textContent, "bar", "The first query param value was incorrect.");
|
||||
is(values[0].textContent, "\"bar\"", "The first query param value was incorrect.");
|
||||
is(labels[1].textContent, "baz", "The second query param name was incorrect.");
|
||||
is(values[1].textContent, "42", "The second query param value was incorrect.");
|
||||
is(values[1].textContent, "\"42\"", "The second query param value was incorrect.");
|
||||
is(labels[2].textContent, "type", "The third query param name was incorrect.");
|
||||
is(values[2].textContent, type, "The third query param value was incorrect.");
|
||||
is(values[2].textContent, "\"" + type + "\"",
|
||||
"The third query param value was incorrect.");
|
||||
|
||||
if (type == "urlencoded") {
|
||||
checkVisibility("params");
|
||||
is(labels.length, 5, "There should be 5 param values displayed in this tabpanel.");
|
||||
is(labels[3].textContent, "foo", "The first post param name was incorrect.");
|
||||
is(values[3].textContent, "bar", "The first post param value was incorrect.");
|
||||
is(values[3].textContent, "\"bar\"", "The first post param value was incorrect.");
|
||||
is(labels[4].textContent, "baz", "The second post param name was incorrect.");
|
||||
is(values[4].textContent, "123", "The second post param value was incorrect.");
|
||||
is(values[4].textContent, "\"123\"", "The second post param value was incorrect.");
|
||||
} else {
|
||||
checkVisibility("params editor");
|
||||
|
||||
|
|
|
@ -55,9 +55,9 @@ add_task(function* () {
|
|||
.querySelectorAll("tr:not(.tree-section) .treeValueCell .objectBox");
|
||||
|
||||
is(labels[0].textContent, "foo", "The first query param name was incorrect.");
|
||||
is(values[0].textContent, "bar", "The first query param value was incorrect.");
|
||||
is(values[0].textContent, "\"bar\"", "The first query param value was incorrect.");
|
||||
is(labels[1].textContent, "baz", "The second query param name was incorrect.");
|
||||
is(values[1].textContent, "123", "The second query param value was incorrect.");
|
||||
is(values[1].textContent, "\"123\"", "The second query param value was incorrect.");
|
||||
|
||||
return teardown(monitor);
|
||||
});
|
||||
|
|
|
@ -50,11 +50,11 @@ add_task(function* () {
|
|||
|
||||
is(labels[labels.length - 2].textContent, "content-type",
|
||||
"The first request header name was incorrect.");
|
||||
is(values[values.length - 2].textContent, "application/x-www-form-urlencoded",
|
||||
is(values[values.length - 2].textContent, "\"application/x-www-form-urlencoded\"",
|
||||
"The first request header value was incorrect.");
|
||||
is(labels[labels.length - 1].textContent, "custom-header",
|
||||
"The second request header name was incorrect.");
|
||||
is(values[values.length - 1].textContent, "hello world!",
|
||||
is(values[values.length - 1].textContent, "\"hello world!\"",
|
||||
"The second request header value was incorrect.");
|
||||
|
||||
// Wait for all tree sections updated by react
|
||||
|
@ -80,9 +80,9 @@ add_task(function* () {
|
|||
.querySelectorAll("tr:not(.tree-section) .treeValueCell .objectBox");
|
||||
|
||||
is(labels[0].textContent, "foo", "The first payload param name was incorrect.");
|
||||
is(values[0].textContent, "bar", "The first payload param value was incorrect.");
|
||||
is(values[0].textContent, "\"bar\"", "The first payload param value was incorrect.");
|
||||
is(labels[1].textContent, "baz", "The second payload param name was incorrect.");
|
||||
is(values[1].textContent, "123", "The second payload param value was incorrect.");
|
||||
is(values[1].textContent, "\"123\"", "The second payload param value was incorrect.");
|
||||
|
||||
return teardown(monitor);
|
||||
});
|
||||
|
|
|
@ -182,6 +182,7 @@ add_task(function* () {
|
|||
|
||||
let panel = document.querySelector("#params-panel");
|
||||
let statusParamValue = data.uri.split("=").pop();
|
||||
let statusParamShownValue = "\"" + statusParamValue + "\"";
|
||||
let treeSections = panel.querySelectorAll(".tree-section");
|
||||
|
||||
is(treeSections.length, 1,
|
||||
|
@ -201,7 +202,7 @@ add_task(function* () {
|
|||
"The params scope doesn't have the correct title.");
|
||||
|
||||
is(labels[0].textContent, "sts", "The param name was incorrect.");
|
||||
is(values[0].textContent, statusParamValue, "The param value was incorrect.");
|
||||
is(values[0].textContent, statusParamShownValue, "The param value was incorrect.");
|
||||
|
||||
ok(panel.querySelector(".treeTable"),
|
||||
"The request params tree view should be displayed.");
|
||||
|
|
Загрузка…
Ссылка в новой задаче