mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1150697
- Add IP address to the Network Monitor domain tooltip. r=bgrins
This commit is contained in:
parent
13ab5ef6a7
commit
d76f51c873
@ -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);
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user