Index: content/browser/frame_host/navigation_controller_impl_browsertest.cc |
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
index c9fa5bdc0db9d7ed2c65fe6bed4fbb383cfe99c2..c14f741f32f585b8420631103b6f2f203f2607cb 100644 |
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
@@ -25,6 +25,7 @@ |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/common/bindings_policy.h" |
+#include "content/public/common/browser_side_navigation_policy.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/test/browser_test_utils.h" |
#include "content/public/test/content_browser_test.h" |
@@ -2604,8 +2605,19 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
"bar.com", "/navigation_controller/simple_page_1.html")); |
NavigateFrameToURL(foo_subframe, bar_url); |
EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); |
- EXPECT_NE(main_site_instance, |
- foo_subframe->current_frame_host()->GetSiteInstance()); |
+ |
+ // PlzNavigate: when ran just with PlzNavigate enabled, and not in |
Charlie Reis
2016/01/26 17:21:46
nit: s/ran/run/, drop comma.
clamy
2016/01/27 10:50:42
Done.
|
+ // site-per-process-mode the subframe should be in the same SiteInstance as |
+ // its parent. |
+ if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) { |
+ EXPECT_TRUE(IsBrowserSideNavigationEnabled()); |
Charlie Reis
2016/01/26 17:21:46
We shouldn't assume PlzNavigate is the only way fo
clamy
2016/01/27 10:50:42
Done.
|
+ EXPECT_EQ(main_site_instance, |
+ foo_subframe->current_frame_host()->GetSiteInstance()); |
+ } else { |
+ EXPECT_NE(main_site_instance, |
+ foo_subframe->current_frame_host()->GetSiteInstance()); |
+ } |
+ |
foo_subframe_entry = |
controller.GetLastCommittedEntry()->GetFrameEntry(foo_subframe); |
EXPECT_EQ(named_subframe_name, foo_subframe_entry->frame_unique_name()); |