Bug 1472875 - HTTP response text missing in devtools/network/headers panel r=Honza
authorLucas Luna Souza <lucas.lunasouza@mail.utoronto.ca>
Sun, 15 Jul 2018 04:59:30 -0400
changeset 438303 315f887ca184
parent 438302 034e167ff3ab
child 438304 22d45dac40c8
push id108276
push usernerli@mozilla.com
push dateWed, 26 Sep 2018 14:24:51 +0000
treeherdermozilla-inbound@315f887ca184 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1472875
milestone64.0a1
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
Bug 1472875 - HTTP response text missing in devtools/network/headers panel r=Honza
devtools/client/netmonitor/src/assets/styles/NetworkDetailsPanel.css
devtools/client/netmonitor/src/components/HeadersPanel.js
devtools/client/netmonitor/test/browser_net_status-codes.js
--- a/devtools/client/netmonitor/src/assets/styles/NetworkDetailsPanel.css
+++ b/devtools/client/netmonitor/src/assets/styles/NetworkDetailsPanel.css
@@ -232,16 +232,17 @@
 }
 
 .headers-summary .textbox-input {
   margin-inline-end: 2px;
 }
 
 .network-monitor .headers-summary .status-text {
     width: auto!important;
+    margin-left: 4px;
 }
 
 /* Response tabpanel */
 
 .network-monitor .response-error-header {
   margin: 0;
   padding: 3px 8px;
   background-color: var(--theme-highlight-red);
--- a/devtools/client/netmonitor/src/components/HeadersPanel.js
+++ b/devtools/client/netmonitor/src/components/HeadersPanel.js
@@ -207,26 +207,34 @@ class HeadersPanel extends Component {
     const summaryAddress = remoteAddress ?
       this.renderSummary(SUMMARY_ADDRESS,
         getFormattedIPAndPort(remoteAddress, remotePort)) : null;
 
     let summaryStatus;
 
     if (status) {
       const statusCodeDocURL = getHTTPStatusCodeURL(status.toString());
+      const inputWidth = statusText.length + 1;
       const toggleRawHeadersClassList = ["devtools-button", "raw-headers-button"];
       if (this.state.rawHeadersOpened) {
         toggleRawHeadersClassList.push("checked");
       }
       summaryStatus = (
         div({ className: "tabpanel-summary-container headers-summary" },
           div({
             className: "tabpanel-summary-label headers-summary-label",
           }, SUMMARY_STATUS),
           StatusCode({ item }),
+          input({
+            className: "tabpanel-summary-value textbox-input devtools-monospace"
+              + " status-text",
+            readOnly: true,
+            value: `${statusText}`,
+            size: `${inputWidth}`,
+          }),
           statusCodeDocURL ? MDNLink({
             url: statusCodeDocURL,
           }) : span({
             className: "headers-summary learn-more-link",
           }),
           button({
             className: "devtools-button edit-and-resend-button",
             onClick: cloneSelectedRequest,
--- a/devtools/client/netmonitor/test/browser_net_status-codes.js
+++ b/devtools/client/netmonitor/test/browser_net_status-codes.js
@@ -171,26 +171,28 @@ add_task(async function() {
 
     await waitUntil(() => document.querySelector(
       "#headers-panel .tabpanel-summary-value.textbox-input"));
 
     const panel = document.querySelector("#headers-panel");
     const summaryValues = panel.querySelectorAll(".tabpanel-summary-value.textbox-input");
     const { method, correctUri, details: { status, statusText } } = data;
     const statusCode = panel.querySelector(".status-code");
+    const statusTextInput = panel.querySelector(".status-text");
     EventUtils.sendMouseEvent({ type: "mouseover" }, statusCode);
     await waitUntil(() => statusCode.title);
 
     is(summaryValues[0].value, correctUri,
       "The url summary value is incorrect.");
     is(summaryValues[1].value, method, "The method summary value is incorrect.");
     is(statusCode.dataset.code, status,
       "The status summary code is incorrect.");
     is(statusCode.getAttribute("title"), status + " " + statusText,
       "The status summary value is incorrect.");
+    is(statusTextInput.value, statusText, "The status text value is incorrect.");
   }
 
   /**
    * A function that tests "Params" panel contains correct information.
    */
   function testParams(data, index) {
     EventUtils.sendMouseEvent({ type: "mousedown" },
       document.querySelectorAll(".request-list-item")[index]);