diff --git a/browser/devtools/netmonitor/netmonitor-view.js b/browser/devtools/netmonitor/netmonitor-view.js index 9eff49e60bb..7f540a16362 100644 --- a/browser/devtools/netmonitor/netmonitor-view.js +++ b/browser/devtools/netmonitor/netmonitor-view.js @@ -1230,6 +1230,7 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, { break; case "remoteAddress": requestItem.attachment.remoteAddress = value; + this.updateMenuView(requestItem, key, value); break; case "remotePort": requestItem.attachment.remotePort = value; @@ -1382,6 +1383,11 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, { domain.setAttribute("tooltiptext", hostPort); break; } + case "remoteAddress": + let domain = $(".requests-menu-domain", target); + let tooltip = domain.getAttribute("value") + " (" + aValue + ")"; + domain.setAttribute("tooltiptext", tooltip); + break; case "securityState": { let tooltip = L10N.getStr("netmonitor.security.state." + aValue); let icon = $(".requests-security-state-icon", target); diff --git a/browser/devtools/netmonitor/test/head.js b/browser/devtools/netmonitor/test/head.js index 3f1b0898ba5..d3551c95354 100644 --- a/browser/devtools/netmonitor/test/head.js +++ b/browser/devtools/netmonitor/test/head.js @@ -275,6 +275,7 @@ function verifyRequestItemTarget(aRequestItem, aMethod, aUrl, aData = {}) { let name = uri.fileName || "/"; let query = uri.query; let hostPort = uri.hostPort; + let remoteAddress = attachment.remoteAddress; if (fuzzyUrl) { ok(attachment.method.startsWith(aMethod), "The attached method is incorrect."); @@ -301,8 +302,10 @@ function verifyRequestItemTarget(aRequestItem, aMethod, aUrl, aData = {}) { is(target.querySelector(".requests-menu-domain").getAttribute("value"), hostPort, "The displayed domain is incorrect."); + + let domainTooltip = hostPort + (remoteAddress ? " (" + remoteAddress + ")" : ""); is(target.querySelector(".requests-menu-domain").getAttribute("tooltiptext"), - hostPort, "The tooltip domain is incorrect."); + domainTooltip, "The tooltip domain is incorrect."); if (status !== undefined) { let value = target.querySelector(".requests-menu-status").getAttribute("code");