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

Unified Diff: Source/devtools/front_end/resources/ServiceWorkersView.js

Issue 1048763002: [DevTools] Show LastModified and ResponseTime of ServiceWorker script in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use WebInspector.UIString Created 5 years, 9 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
Index: Source/devtools/front_end/resources/ServiceWorkersView.js
diff --git a/Source/devtools/front_end/resources/ServiceWorkersView.js b/Source/devtools/front_end/resources/ServiceWorkersView.js
index eec898427161a22f3e1aff240945e0e72381c694..e3095b8e7095f4cf42c25b76a7243d2aa7037ad4 100644
--- a/Source/devtools/front_end/resources/ServiceWorkersView.js
+++ b/Source/devtools/front_end/resources/ServiceWorkersView.js
@@ -321,6 +321,20 @@ WebInspector.SWRegistrationElement.prototype = {
inspectButton.createTextChild(WebInspector.UIString("inspect"));
inspectButton.addEventListener("click", this._inspectButtonClicked.bind(this, version.id), false);
}
+
+ if (version.scriptLastModified) {
+ var scriptLastModifiedDiv = scriptURLDiv.createChild("div", "service-workers-info");
+ var scriptLastModifiedText = WebInspector.UIString("Last-Modified: ") + (new Date(version.scriptLastModified * 1000)).toConsoleTime();
dgozman 2015/03/30 12:54:23 WI.UIString("Last-Modified: %s", <last modified va
horo 2015/03/30 15:05:40 Done.
+ scriptLastModifiedDiv.createChild("div", "service-workers-info-icon");
+ scriptLastModifiedDiv.createChild("div", "service-workers-info-message service-worker-script-last-modified").createTextChild(scriptLastModifiedText);
+ }
+ if (version.scriptResponseTime) {
dgozman 2015/03/30 12:54:23 As a user, I don't understand the "Response time"
horo 2015/03/30 15:05:40 Changed to "Server response time: "
+ var scriptResponseTimeDiv = scriptURLDiv.createChild("div", "service-workers-info");
+ var scriptResponseTimeText = WebInspector.UIString("Response time: ") + (new Date(version.scriptResponseTime * 1000)).toConsoleTime();
dgozman 2015/03/30 12:54:23 ditto
horo 2015/03/30 15:05:40 Done.
+ scriptResponseTimeDiv.createChild("div", "service-workers-info-icon");
+ scriptResponseTimeDiv.createChild("div", "service-workers-info-message service-worker-script-response-time").createTextChild(scriptResponseTimeText);
+ }
+
var errorMessages = version.errorMessages;
for (var index = 0; index < errorMessages.length; ++index) {
var errorDiv = scriptURLDiv.createChild("div", "service-workers-error");
@@ -334,6 +348,7 @@ WebInspector.SWRegistrationElement.prototype = {
script_path = String.sprintf("%s:%d", script_path, errorMessages[index].lineNumber);
errorDiv.createChild("div", "service-workers-error-line").createTextChild(script_path);
}
+
}
if (!versions.length) {
var stateRowElement = versionsElement.createChild("div", "service-workers-version-row");

Powered by Google App Engine
This is Rietveld 408576698