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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-manager.html

Issue 2373913004: [DevTools] Fix and rebaseline inspector/service-workers layout tests. (Closed)
Patch Set: Created 4 years, 3 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: third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-manager.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-manager.html b/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-manager.html
index 906a6388b2dbcf8eadf2e11f11a425073549a99e..079e1b9871f851d46bdc00eb44f787e9e7265e8c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-manager.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-manager.html
@@ -13,21 +13,24 @@ function test()
WebInspector.targetManager.observeTargets({
targetAdded: function(target)
{
- InspectorTest.addResult("Target added: " + target.name() + " type: " + target._type);
- if (target.isDedicatedWorker()) {
+ InspectorTest.addResult("Target added: " + target.name() + "; type: " + InspectorTest.describeTargetType(target));
+ if (InspectorTest.isDedicatedWorker(target)) {
var serviceWorkerManager = WebInspector.targetManager.mainTarget().serviceWorkerManager;
// Allow agents to do rountrips.
InspectorTest.deprecatedRunAfterPendingDispatches(function() {
- for (var worker of serviceWorkerManager.workers())
- worker.stop();
+ for (var registration of serviceWorkerManager.registrations().valuesArray()) {
+ for (var version of registration.versions.valuesArray()) {
lushnikov 2016/09/28 18:46:44 nit: drop braces {}
+ serviceWorkerManager.stopWorker(version.id);
+ }
+ }
});
}
},
targetRemoved: function(target)
{
- InspectorTest.addResult("Target removed: " + target.name() + " type: " + target._type);
- if (target.isServiceWorker())
+ InspectorTest.addResult("Target removed: " + target.name() + "; type: " + InspectorTest.describeTargetType(target));
+ if (InspectorTest.isServiceWorker(target))
setTimeout(InspectorTest.completeTest);
}
});

Powered by Google App Engine
This is Rietveld 408576698