Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / chromium / frame-removed.html
blob036454dcd1c8a961ae737f8dffeb34a8969df7e3
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>navigator.serviceWorker should return null when frame is removed</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <iframe id="subframe" src="about:blank"></iframe>
10 <script>
11 test(function(t) {
12 var iframe = document.querySelector("#subframe");
13 var f = iframe.contentWindow.Function;
14 function get_navigator() {
15 return f("return navigator")();
17 iframe.remove();
18 assert_equals(get_navigator().serviceWorker, null);
19 });
20 done();
21 </script>
23 </body>
24 </html>