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

Unified Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 2296483002: Fix some unit_tests under PlzNavigate (Closed)
Patch Set: . Created 4 years, 4 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
Index: chrome/test/base/browser_with_test_window_test.cc
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index 967d987a9767d7bd18ab6778fd9090bf329c94f7..be59550dbd2ed5ec73948f370ebd6eb3078f46cb 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -19,6 +19,8 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/browser_side_navigation_policy.h"
+#include "content/public/test/browser_side_navigation_test_utils.h"
#include "content/public/test/test_renderer_host.h"
#include "ui/base/page_transition_types.h"
@@ -65,6 +67,9 @@ void BrowserWithTestWindowTest::SetUp() {
SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient());
#endif
+ if (content::IsBrowserSideNavigationEnabled())
+ content::BrowserSideNavigationSetUp();
+
// Subclasses can provide their own Profile.
profile_ = CreateProfile();
// Subclasses can provide their own test BrowserWindow. If they return NULL
@@ -128,6 +133,7 @@ void BrowserWithTestWindowTest::CommitPendingLoad(
return; // Nothing to commit.
RenderFrameHost* old_rfh = controller->GetWebContents()->GetMainFrame();
+ content::SimulateCurrentRenderFrameHostUnloading(old_rfh);
RenderFrameHost* pending_rfh = RenderFrameHostTester::GetPendingForController(
controller);

Powered by Google App Engine
This is Rietveld 408576698