Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Unified Diff: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js

Issue 2354873003: DevTools security panel: prompt user to reload for mixed requests (Closed)
Patch Set: add a test that includes active mixed content Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/mixed-content-reload-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
index f6fab659abbfe67214ff29f5ea4d9e27d2dd5d3c..133c27f0c6913d1f8dcb09e8aac19906a53a9de0 100644
--- a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
@@ -796,13 +796,25 @@ WebInspector.SecurityMainView.prototype = {
"description": description
});
+ var explanation = this._addExplanation(parent, mixedContentExplanation);
+
var filterRequestCount = this._panel.filterRequestCount(filterKey);
- var requestsAnchor = this._addExplanation(parent, mixedContentExplanation).createChild("div", "security-mixed-content link");
- if (filterRequestCount > 0) {
- requestsAnchor.textContent = WebInspector.UIString("View %d request%s in Network Panel", filterRequestCount, (filterRequestCount > 1 ? "s" : ""));
+ if (!filterRequestCount) {
+ // Network instrumentation might not have been enabled for the page
+ // load, so the security panel does not necessarily know a count of
+ // individual mixed requests at this point. Prompt them to refresh
+ // instead of pointing them to the Network panel to get prompted
+ // to refresh.
+ var refreshPrompt = explanation.createChild("div", "security-mixed-content");
+ refreshPrompt.textContent = WebInspector.UIString("Reload the page to record requests for HTTP resources.");
+ return;
+ }
+
+ var requestsAnchor = explanation.createChild("div", "security-mixed-content link");
+ if (filterRequestCount === 1) {
+ requestsAnchor.textContent = WebInspector.UIString("View %d request in Network Panel", filterRequestCount);
} else {
- // Network instrumentation might not have been enabled for the page load, so the security panel does not necessarily know a count of individual mixed requests at this point. Point the user at the Network Panel which prompts them to refresh.
- requestsAnchor.textContent = WebInspector.UIString("View requests in Network Panel");
+ requestsAnchor.textContent = WebInspector.UIString("View %d requests in Network Panel", filterRequestCount);
}
requestsAnchor.href = "";
requestsAnchor.addEventListener("click", networkFilterFn);
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/mixed-content-reload-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698