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

Side by Side Diff: LayoutTests/http/tests/serviceworker/chromium/service-worker-gc.html

Issue 674133004: [ServiceWorker] Introduce the directory restriction of ServiceWorker scope [1/3 blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/scope-default.html Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="/js-test-resources/js-test.js"></script> 2 <script src="/js-test-resources/js-test.js"></script>
3 <script src="../resources/test-helpers.js"></script>
3 <script> 4 <script>
4 window.jsTestIsAsync = true; 5 window.jsTestIsAsync = true;
5 description('Test that ServiceWorker and ServiceWorkerRegistration are not garba ge collected prematurely'); 6 description('Test that ServiceWorker and ServiceWorkerRegistration are not garba ge collected prematurely');
6 var registrationObservation = null; 7 var registrationObservation = null;
7 var swObservation = null; 8 var swObservation = null;
8 var scope = 'gc'; 9 var scope = base_path() + '../resources/gc';
9 10
10 if (!window.internals) { 11 if (!window.internals) {
11 testFailed('This test requires internals.observeGC'); 12 testFailed('This test requires internals.observeGC');
12 finishJSTest(); 13 finishJSTest();
13 } else { 14 } else {
14 setup(); 15 setup();
15 } 16 }
16 17
17 function setup() { 18 function setup() {
18 var worker = '../resources/empty-worker.js'; 19 var worker = '../resources/empty-worker.js';
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // The worker is 'redundant' but the registration holds a reference to it, 80 // The worker is 'redundant' but the registration holds a reference to it,
80 // so it shouldn't be collected yet. 81 // so it shouldn't be collected yet.
81 // FIXME: When crbug.com/398355 is fixed, register a new script URL and 82 // FIXME: When crbug.com/398355 is fixed, register a new script URL and
82 // once the new worker is activated, check that the old worker is gc'd. 83 // once the new worker is activated, check that the old worker is gc'd.
83 gc(); 84 gc();
84 shouldBeFalse('registrationObservation.wasCollected'); 85 shouldBeFalse('registrationObservation.wasCollected');
85 shouldBeFalse('swObservation.wasCollected'); 86 shouldBeFalse('swObservation.wasCollected');
86 finishJSTest(); 87 finishJSTest();
87 } 88 }
88 </script> 89 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698