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

Unified Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 1631273003: PlzNavigate: fix expectation in NavigationControllerBrowserTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698