Skip to content

Commit

Permalink
[DIP] Add DIP Reporter to SharedWorkers
Browse files Browse the repository at this point in the history
This CL adds a DocumentIsolationPolicy reporter for SharedWorkers,
based on their DocumentIsolationPolicy. It is stored in the
SharedWorkerHost, and communicates with a ReportingObserver bound in
the WorkerContext.

This CL also fixes an issue where the COEP reporter of the
SharedWorker was not connected to a ReportingObserver.

This CL is part of a chain of CLs implementing DocumentIsolationPolicy

1) Add DocumentIsolationPolicyReporter
2) Implement DocumentIsolationPolicyReporter
3) Pass the reporter to URLloaderFactory
4) Plumb DIP reporter into ServiceWorkers
5) Add a DIP reporter to DedicatedWorker
6) Add a DIP reporter to SharedWorker <- you are here
7) Plumb DIP reporter in CacheStorage

reporting:
Bug: 333029815, 40190911
Change-Id: Ifb5c3883376bd5a255dd307ff1cb8f0c1b90f964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187126
Reviewed-by: Mike West <[email protected]>
Reviewed-by: Hiroki Nakagawa <[email protected]>
Commit-Queue: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1410793}
  • Loading branch information
Camille Lamy authored and chromium-wpt-export-bot committed Jan 24, 2025
1 parent d852a80 commit 9334f98
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@
test.add_cleanup(() => worker.terminate());
return await fetchInWorker(worker, url, expected_count);
},
}, {
tag: 'shared worker',
contextUrl: WORKER_URL,
run: async (test, url, expected_count) => {
const worker = new SharedWorker(WORKER_URL);
worker.addEventListener('error', test.unreached_func('Worker.onerror'));
return await fetchInWorker(worker.port, url, expected_count);
},
}, {
tag: 'between service worker and page',
contextUrl: REPORTING_FRAME_URL,
Expand Down

0 comments on commit 9334f98

Please sign in to comment.