2 <div id=
"container"></div>
3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
6 var test
= async_test("This test checks if accessing navigator.serviceWorker doesn't crash with invalid frame");
9 testRunner
.setCanOpenWindows();
12 // At this time window.navigator may be replaced with a new iframe's one,
13 // which could be now invalid.
14 var sw
= navigator
.serviceWorker
;
18 test
.step(function() {
19 var w
= window
.open("x", "y");
20 window
.navigator
= w
.navigator
;
21 setTimeout(callback
, 1);