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

Unified Diff: content/browser/tab_contents/render_view_host_manager_unittest.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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: content/browser/tab_contents/render_view_host_manager_unittest.cc
diff --git a/content/browser/tab_contents/render_view_host_manager_unittest.cc b/content/browser/tab_contents/render_view_host_manager_unittest.cc
index 4ab04189a822d81c36a02a22596f618109757a7f..b12b3ea59cfc1856f48b841be8cbdd5ece1d2654 100644
--- a/content/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/content/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -114,7 +114,7 @@ class RenderViewHostManagerTest : public RenderViewHostTestHarness {
// won't have committed yet, so NavigateAndCommit does the wrong thing
// for us.
controller().LoadURL(
- url, GURL(), content::PAGE_TRANSITION_LINK, std::string());
+ url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string());
TestRenderViewHost* old_rvh = rvh();
// Simulate the ShouldClose_ACK that is received from the current renderer
@@ -165,7 +165,8 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
// a RVH that's not pending (since there is no cross-site transition), so
// we use the committed one.
contents2.controller().LoadURL(
- kNtpUrl, GURL(), content::PAGE_TRANSITION_LINK, std::string());
+ kNtpUrl, content::Referrer(), content::PAGE_TRANSITION_LINK,
+ std::string());
TestRenderViewHost* ntp_rvh2 = static_cast<TestRenderViewHost*>(
contents2.render_manager_for_testing()->current_host());
EXPECT_FALSE(contents2.cross_navigation_pending());
@@ -174,7 +175,8 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
// The second one is the opposite, creating a cross-site transition and
// requiring a beforeunload ack.
contents2.controller().LoadURL(
- kDestUrl, GURL(), content::PAGE_TRANSITION_LINK, std::string());
+ kDestUrl, content::Referrer(), content::PAGE_TRANSITION_LINK,
+ std::string());
EXPECT_TRUE(contents2.cross_navigation_pending());
TestRenderViewHost* dest_rvh2 = static_cast<TestRenderViewHost*>(
contents2.render_manager_for_testing()->pending_render_view_host());
@@ -194,7 +196,8 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
NavigateActiveAndCommit(kNtpUrl);
contents2.controller().LoadURL(
- kNtpUrl, GURL(), content::PAGE_TRANSITION_LINK, std::string());
+ kNtpUrl, content::Referrer(), content::PAGE_TRANSITION_LINK,
+ std::string());
dest_rvh2->SendShouldCloseACK(true);
static_cast<TestRenderViewHost*>(contents2.render_manager_for_testing()->
pending_render_view_host())->SendNavigate(102, kNtpUrl);
@@ -223,7 +226,7 @@ TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
// Navigate.
controller().LoadURL(
- kUrl, GURL(), content::PAGE_TRANSITION_TYPED, std::string());
+ kUrl, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string());
// Simulate response from RenderView for FirePageBeforeUnload.
rvh()->TestOnMessageReceived(
ViewHostMsg_ShouldClose_ACK(rvh()->routing_id(), true));
@@ -244,7 +247,7 @@ TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
process()->sink().ClearMessages();
// Navigate, again.
controller().LoadURL(
- kUrl, GURL(), content::PAGE_TRANSITION_TYPED, std::string());
+ kUrl, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string());
// The same RenderViewHost should be reused.
EXPECT_FALSE(pending_rvh());
EXPECT_TRUE(last_rvh == rvh());
« no previous file with comments | « content/browser/tab_contents/navigation_controller_unittest.cc ('k') | content/browser/tab_contents/test_tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698