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

Side by Side Diff: LayoutTests/http/tests/serviceworker/chromium/frame-detached-by-navigation.html

Issue 1308723003: DOMWindow::navigator should return navigator w/o frame when detached. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/chromium/frame-removed.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>navigator.serviceWorker should return null when frame is detached</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 promise_test(function(t) {
12 var iframe = document.querySelector("#subframe");
13 var f = iframe.contentWindow.Function;
14 function get_navigator() {
15 return f("return navigator")();
16 }
17 return new Promise(function(resolve) {
18 assert_equals(iframe.contentWindow.navigator, get_navigator());
19 iframe.src = "resources/a.html";
20 iframe.onload = resolve;
21 }).then(function() {
22 assert_equals(get_navigator().serviceWorker, null);
23 });
24 });
25 </script>
26
27 </body>
28 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/chromium/frame-removed.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698