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..747682448dbead70f8d7a180f91d564393f8ddcf 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" |
Charlie Reis
2016/01/27 17:24:17
nit: No longer needed.
clamy
2016/01/28 13:11:15
Done.
|
#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,18 @@ 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()); |
+ |
+ // When run just with subframe navigation entries enabled and not in |
+ // site-per-process-mode the subframe should be in the same SiteInstance as |
+ // its parent. |
+ if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) { |
+ 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()); |