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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js

Issue 1940993002: DevTools: simplify Service Workers panel UI, remove non-actionable data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed. Created 4 years, 7 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 | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js
index b172766bfed42fb1cb8f87d78b251f250e92dc32..b26d54c502006c25106ee6302dadfcb6b726e801 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js
@@ -34,31 +34,10 @@ InspectorTest.waitForServiceWorker = function(callback)
});
}
-function replaceInnerTextAll(rootElement, selectors, replacementString)
-{
- var elements = rootElement.querySelectorAll(selectors);
- for (var i = 0; i < elements.length; i++)
- elements[i].textContent = replacementString;
-}
-
-function modifyTestUnfriendlyText(rootElement)
-{
- replaceInnerTextAll(rootElement, ".service-worker-script-last-modified", "LAST-MODIFIED");
- replaceInnerTextAll(rootElement, ".service-worker-script-response-time", "RESPONSE-TIME");
- replaceInnerTextAll(rootElement, ".service-worker-client", "CLIENT");
-}
-
-InspectorTest.dumpServiceWorkersView = function(scopes)
+InspectorTest.dumpServiceWorkersView = function()
{
var swView = WebInspector.panels.resources.visibleView;
- modifyTestUnfriendlyText(swView._root);
- var results = [];
- var expectedTitles = scopes.map(function(scope) {return "Scope: " + (new URL(scope).pathname)});
- results.push("==== ServiceWorkersView ====");
- for (var childView of swView.children())
- results.push(childView.element.innerText);
- results.push("============================");
- return results;
+ return swView._reportView._sectionList.childTextNodes().map(function(node) { return node.textContent.replace(/Last modified.*/, "Last modified"); }).join("\n");
}
InspectorTest.deleteServiceWorkerRegistration = function(scope)
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698