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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/resources/navigation-preload-after-gc-worker.js

Issue 2764293002: Add LayoutTests for the fixed multithread GC bug of ServiceWorker Navigation Preload (Closed)
Patch Set: incorporated falken's comment Created 3 years, 9 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/serviceworker/navigation-preload/chromium/resources/navigation-preload-after-gc-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/resources/navigation-preload-after-gc-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/resources/navigation-preload-after-gc-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..039c7ab0a3ddda594cac34a5cb7d4813a3fde865
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/resources/navigation-preload-after-gc-worker.js
@@ -0,0 +1,9 @@
+
+self.addEventListener('activate', e => {
+ e.waitUntil(self.registration.navigationPreload.enable());
+ });
+
+self.addEventListener('fetch', e => {
+ internals.collectGarbage();
+ e.respondWith(new Response("hello"));
+ });

Powered by Google App Engine
This is Rietveld 408576698