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

Side by Side Diff: LayoutTests/fast/dom/navigator-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, 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <iframe id="subframe" src="about:blank"></iframe>
9 <script>
10 promise_test(function(t) {
11 var iframe = document.querySelector("#subframe");
12 var f = iframe.contentWindow.Function;
13 function get_navigator() {
14 return f("return navigator")();
15 }
16 return new Promise(function(resolve) {
17 assert_equals(iframe.contentWindow.navigator, get_navigator());
18 iframe.src = "resources/a.html";
19 iframe.onload = resolve;
20 }).then(function() {
21 assert_equals(get_navigator(), null);
22 });
23 });
24 </script>
25
26 </body>
27 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/LocalDOMWindow.cpp » ('j') | Source/core/frame/LocalDOMWindow.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698