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

Unified Diff: content/browser/browser_side_navigation_browsertest.cc

Issue 1722623003: PlzNavigate: use RenderFrameHostImpl::IsRendererTransferNeededForNavigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-policy
Patch Set: Rebase + updates to tests Created 4 years, 10 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 | content/browser/frame_host/navigator_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_side_navigation_browsertest.cc
diff --git a/content/browser/browser_side_navigation_browsertest.cc b/content/browser/browser_side_navigation_browsertest.cc
index 3ffef7d88d2018289205cc8102e84d4b665d9b82..c23b7370d800da24e052387410cc23fab2f2043b 100644
--- a/content/browser/browser_side_navigation_browsertest.cc
+++ b/content/browser/browser_side_navigation_browsertest.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/common/site_isolation_policy.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
@@ -156,9 +157,21 @@ IN_PROC_BROWSER_TEST_F(BrowserSideNavigationBrowserTest,
EXPECT_TRUE(observer.last_navigation_succeeded());
}
- // The RenderFrameHost should not have changed.
- EXPECT_EQ(initial_rfh, static_cast<WebContentsImpl*>(shell()->web_contents())
- ->GetFrameTree()->root()->current_frame_host());
+ // The RenderFrameHost should not have changed unless site-per-process is
+ // enabled.
+ if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) {
+ EXPECT_NE(initial_rfh,
+ static_cast<WebContentsImpl*>(shell()->web_contents())
+ ->GetFrameTree()
+ ->root()
+ ->current_frame_host());
+ } else {
+ EXPECT_EQ(initial_rfh,
+ static_cast<WebContentsImpl*>(shell()->web_contents())
+ ->GetFrameTree()
+ ->root()
+ ->current_frame_host());
+ }
}
// Ensure that browser side navigation handles navigation failures.
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698