From 97a726afc2fef54f9e8867ef2b60680c29857491 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Mon, 3 Apr 2017 15:35:15 +0200 Subject: [PATCH] Backed out changeset dcbdfb3fdaf2 (bug 1258628) for eslint failure --- .../netmonitor/src/components/properties-view.js | 1 - .../netmonitor/test/browser_net_complex-params.js | 12 ++++++------ .../netmonitor/test/browser_net_content-type.js | 2 +- .../client/netmonitor/test/browser_net_json-b64.js | 2 +- .../netmonitor/test/browser_net_json_custom_mime.js | 2 +- .../netmonitor/test/browser_net_json_text_mime.js | 2 +- devtools/client/netmonitor/test/browser_net_jsonp.js | 4 ++-- .../netmonitor/test/browser_net_post-data-01.js | 11 ++++++----- .../netmonitor/test/browser_net_post-data-02.js | 4 ++-- .../netmonitor/test/browser_net_post-data-03.js | 8 ++++---- .../netmonitor/test/browser_net_status-codes.js | 3 ++- 11 files changed, 26 insertions(+), 25 deletions(-) diff --git a/devtools/client/netmonitor/src/components/properties-view.js b/devtools/client/netmonitor/src/components/properties-view.js index 2bef421c28d8..47fb310367c8 100644 --- a/devtools/client/netmonitor/src/components/properties-view.js +++ b/devtools/client/netmonitor/src/components/properties-view.js @@ -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, diff --git a/devtools/client/netmonitor/test/browser_net_complex-params.js b/devtools/client/netmonitor/test/browser_net_complex-params.js index df27f509f309..3568bee902f6 100644 --- a/devtools/client/netmonitor/test/browser_net_complex-params.js +++ b/devtools/client/netmonitor/test/browser_net_complex-params.js @@ -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]); diff --git a/devtools/client/netmonitor/test/browser_net_content-type.js b/devtools/client/netmonitor/test/browser_net_content-type.js index 99fb9e88c841..cbc63010d22a 100644 --- a/devtools/client/netmonitor/test/browser_net_content-type.js +++ b/devtools/client/netmonitor/test/browser_net_content-type.js @@ -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": { diff --git a/devtools/client/netmonitor/test/browser_net_json-b64.js b/devtools/client/netmonitor/test/browser_net_json-b64.js index a84a59f948f7..cf1732cf463a 100644 --- a/devtools/client/netmonitor/test/browser_net_json-b64.js +++ b/devtools/client/netmonitor/test/browser_net_json-b64.js @@ -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); diff --git a/devtools/client/netmonitor/test/browser_net_json_custom_mime.js b/devtools/client/netmonitor/test/browser_net_json_custom_mime.js index 80a68716d7b3..30d99d81c029 100644 --- a/devtools/client/netmonitor/test/browser_net_json_custom_mime.js +++ b/devtools/client/netmonitor/test/browser_net_json_custom_mime.js @@ -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."); } }); diff --git a/devtools/client/netmonitor/test/browser_net_json_text_mime.js b/devtools/client/netmonitor/test/browser_net_json_text_mime.js index 299dfc23f8f7..8e872935101a 100644 --- a/devtools/client/netmonitor/test/browser_net_json_text_mime.js +++ b/devtools/client/netmonitor/test/browser_net_json_text_mime.js @@ -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."); } }); diff --git a/devtools/client/netmonitor/test/browser_net_jsonp.js b/devtools/client/netmonitor/test/browser_net_jsonp.js index 0bbef78eab24..50c487547abb 100644 --- a/devtools/client/netmonitor/test/browser_net_jsonp.js +++ b/devtools/client/netmonitor/test/browser_net_jsonp.js @@ -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); diff --git a/devtools/client/netmonitor/test/browser_net_post-data-01.js b/devtools/client/netmonitor/test/browser_net_post-data-01.js index 07da1efb1287..5578af450d4d 100644 --- a/devtools/client/netmonitor/test/browser_net_post-data-01.js +++ b/devtools/client/netmonitor/test/browser_net_post-data-01.js @@ -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"); diff --git a/devtools/client/netmonitor/test/browser_net_post-data-02.js b/devtools/client/netmonitor/test/browser_net_post-data-02.js index ced8e4ccba8b..ed45d79396b6 100644 --- a/devtools/client/netmonitor/test/browser_net_post-data-02.js +++ b/devtools/client/netmonitor/test/browser_net_post-data-02.js @@ -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); }); diff --git a/devtools/client/netmonitor/test/browser_net_post-data-03.js b/devtools/client/netmonitor/test/browser_net_post-data-03.js index 46f72dff30f3..1aab18dff1d5 100644 --- a/devtools/client/netmonitor/test/browser_net_post-data-03.js +++ b/devtools/client/netmonitor/test/browser_net_post-data-03.js @@ -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); }); diff --git a/devtools/client/netmonitor/test/browser_net_status-codes.js b/devtools/client/netmonitor/test/browser_net_status-codes.js index 5b4511d6e6c2..c50b4973f7ae 100644 --- a/devtools/client/netmonitor/test/browser_net_status-codes.js +++ b/devtools/client/netmonitor/test/browser_net_status-codes.js @@ -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.");