OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/browser/frame_host/frame_tree_node.h" | 8 #include "content/browser/frame_host/frame_tree_node.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 void GoBack() { | 49 void GoBack() { |
50 TestNavigationObserver back_load_observer(shell()->web_contents()); | 50 TestNavigationObserver back_load_observer(shell()->web_contents()); |
51 shell()->web_contents()->GetController().GoBack(); | 51 shell()->web_contents()->GetController().GoBack(); |
52 back_load_observer.Wait(); | 52 back_load_observer.Wait(); |
53 } | 53 } |
54 | 54 |
55 Shell* OpenPopup(FrameTreeNode* opener, const std::string& url) { | 55 Shell* OpenPopup(FrameTreeNode* opener, const std::string& url) { |
56 GURL gurl = | 56 GURL gurl = |
57 opener->current_frame_host()->GetLastCommittedURL().Resolve(url); | 57 opener->current_frame_host()->GetLastCommittedURL().Resolve(url); |
58 return content::OpenPopup(opener->current_frame_host(), gurl, "_blank"); | 58 return content::OpenPopup(opener, gurl, "_blank"); |
59 } | 59 } |
60 | 60 |
61 void RendererInitiatedNavigateToURL(FrameTreeNode* node, const GURL& url) { | 61 void RendererInitiatedNavigateToURL(FrameTreeNode* node, const GURL& url) { |
62 TestFrameNavigationObserver nav_observer(node); | 62 TestFrameNavigationObserver nav_observer(node); |
63 ASSERT_TRUE(ExecuteScript(node->current_frame_host(), | 63 ASSERT_TRUE( |
64 "window.location.href='" + url.spec() + "'")); | 64 ExecuteScript(node, "window.location.href='" + url.spec() + "'")); |
65 nav_observer.Wait(); | 65 nav_observer.Wait(); |
66 } | 66 } |
67 | 67 |
68 private: | 68 private: |
69 FrameTreeVisualizer visualizer_; | 69 FrameTreeVisualizer visualizer_; |
70 }; | 70 }; |
71 | 71 |
72 IN_PROC_BROWSER_TEST_F(TopDocumentIsolationTest, SameSiteDeeplyNested) { | 72 IN_PROC_BROWSER_TEST_F(TopDocumentIsolationTest, SameSiteDeeplyNested) { |
73 if (content::AreAllSitesIsolatedForTesting()) | 73 if (content::AreAllSitesIsolatedForTesting()) |
74 return; // Top Document Isolation is disabled in this mode. | 74 return; // Top Document Isolation is disabled in this mode. |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 " C = http://adnetwork.com/", | 578 " C = http://adnetwork.com/", |
579 DepictFrameTree(root())); | 579 DepictFrameTree(root())); |
580 EXPECT_EQ( | 580 EXPECT_EQ( |
581 " Site C ------------ proxies for B\n" | 581 " Site C ------------ proxies for B\n" |
582 "Where B = default subframe process\n" | 582 "Where B = default subframe process\n" |
583 " C = http://adnetwork.com/", | 583 " C = http://adnetwork.com/", |
584 DepictFrameTree(popup_root)); | 584 DepictFrameTree(popup_root)); |
585 } | 585 } |
586 | 586 |
587 } // namespace content | 587 } // namespace content |
OLD | NEW |