test: service worker main request/response should be marked correctly (#15482)

This commit is contained in:
Meir Blachman 2022-07-11 22:29:49 +03:00 committed by GitHub
parent 26805d7617
commit a5571c9981
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,6 +101,8 @@ test('should intercept service worker requests (main and within)', async ({ cont
const [ sw ] = await Promise.all([
context.waitForEvent('serviceworker'),
context.waitForEvent('request', r => r.url().endsWith('sw.js') && !!r.serviceWorker()),
context.waitForEvent('response', r => r.url().endsWith('sw.js') && !r.fromServiceWorker()),
page.goto(server.PREFIX + '/serviceworkers/empty/sw.html'),
]);