Skip to content

Commit bd85b22

Browse files
Liviu RauDevtools-frontend LUCI CQ
authored andcommitted
Port application/service-worker-update_test to non-hosted
Bug: 416405379 Change-Id: If193c16a05d89db3f808805625081260a05e102a Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6616445 Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Commit-Queue: Liviu Rau <liviurau@chromium.org>
1 parent 0f71433 commit bd85b22

4 files changed

Lines changed: 31 additions & 29 deletions

File tree

test/e2e/application/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import("../../../scripts/build/typescript/typescript.gni")
77
node_ts_library("application") {
88
sources = [
99
"frame-tree_test.ts",
10-
"service-worker-update_test.ts",
1110
"shared-storage_test.ts",
1211
"storage_test.ts",
1312
"window-controls_test.ts",

test/e2e/application/service-worker-update_test.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

test/e2e_non_hosted/application/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ts_e2e_library("application") {
1010
"manifest_test.ts",
1111
"reporting-api_test.ts",
1212
"service-worker-network_test.ts",
13+
"service-worker-update_test.ts",
1314
"session-storage_test.ts",
1415
]
1516

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright 2020 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
import {assert} from 'chai';
5+
6+
import {
7+
navigateToApplicationTab,
8+
navigateToServiceWorkers,
9+
unregisterServiceWorker,
10+
} from '../../e2e/helpers/application-helpers.js';
11+
12+
const TEST_HTML_FILE = 'service-worker-network';
13+
const SERVICE_WORKER_UPDATE_TIMELINE_SELECTOR = '.service-worker-update-timing-table';
14+
15+
describe('The Application Tab', () => {
16+
// TODO (liviurau): Update navigateToApplicationTab helper to work in docked
17+
// mode and remove the setup below.
18+
setup({dockingMode: 'undocked'});
19+
20+
it('Navigate to a page with service worker we should find service worker update timeline info',
21+
async ({devToolsPage, inspectedPage}) => {
22+
await navigateToApplicationTab(TEST_HTML_FILE, devToolsPage, inspectedPage);
23+
await navigateToServiceWorkers(devToolsPage);
24+
25+
const timeline = await devToolsPage.waitFor(SERVICE_WORKER_UPDATE_TIMELINE_SELECTOR);
26+
assert.isDefined(timeline);
27+
28+
await unregisterServiceWorker(devToolsPage);
29+
});
30+
});

0 commit comments

Comments
 (0)