2 <script src=
"../../resources/testharness.js"></script>
3 <script src=
"../../resources/testharnessreport.js"></script>
4 <script src=
"../resources/test-helpers.js"></script>
6 var script1
= normalizeURL('../resources/empty-worker.js');
7 var script2
= normalizeURL('../resources/empty-worker.js?new');
9 promise_test(function(t
) {
10 var scope
= '../resources/scope/register-30-times';
12 return service_worker_unregister(t
, scope
)
15 for (var i
= 0; i
< 15; ++i
) {
16 promises
.push(navigator
.serviceWorker
.register(script1
,
18 promises
.push(navigator
.serviceWorker
.register(script2
,
21 return Promise
.all(promises
);
23 .then(function(registrations
) {
24 return registrations
[0].unregister();
26 }, 'Repetitive registrations with the same scope should not trigger OOM');