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

Unified Diff: chrome/browser/ui/webui/web_ui_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: chrome/browser/ui/webui/web_ui_unittest.cc
diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc
index 19e15e822c0f095994878ffe44d4ecfb018b890e..09ae9ebe5eb3943b81f9f7e7f4f31bb6c35c1fec 100644
--- a/chrome/browser/ui/webui/web_ui_unittest.cc
+++ b/chrome/browser/ui/webui/web_ui_unittest.cc
@@ -30,7 +30,8 @@ class WebUITest : public TabContentsWrapperTestHarness {
// Start a pending load.
GURL new_tab_url(chrome::kChromeUINewTabURL);
- controller->LoadURL(new_tab_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller->LoadURL(new_tab_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
// The navigation entry should be pending with no committed entry.
@@ -51,7 +52,8 @@ class WebUITest : public TabContentsWrapperTestHarness {
// Start a pending navigation to a regular page.
GURL next_url("http://google.com/");
- controller->LoadURL(next_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller->LoadURL(next_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
// Check the flags. Some should reflect the new page (URL, title), some
@@ -103,12 +105,14 @@ TEST_F(WebUITest, WebUIToStandard) {
TEST_F(WebUITest, WebUIToWebUI) {
// Do a load (this state is tested above).
GURL new_tab_url(chrome::kChromeUINewTabURL);
- controller().LoadURL(new_tab_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller().LoadURL(new_tab_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
rvh()->SendNavigate(1, new_tab_url);
// Start another pending load of the new tab page.
- controller().LoadURL(new_tab_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller().LoadURL(new_tab_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
rvh()->SendNavigate(2, new_tab_url);
@@ -122,7 +126,8 @@ TEST_F(WebUITest, StandardToWebUI) {
// Start a pending navigation to a regular page.
GURL std_url("http://google.com/");
- controller().LoadURL(std_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller().LoadURL(std_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
// The state should now reflect the default.
@@ -136,7 +141,8 @@ TEST_F(WebUITest, StandardToWebUI) {
// Start a pending load for a WebUI.
GURL new_tab_url(chrome::kChromeUINewTabURL);
- controller().LoadURL(new_tab_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller().LoadURL(new_tab_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
EXPECT_TRUE(contents_wrapper()->favicon_tab_helper()->ShouldDisplayFavicon());
EXPECT_TRUE(contents()->FocusLocationBarByDefault());
@@ -169,14 +175,16 @@ TEST_F(WebUITest, FocusOnNavigate) {
// Load the NTP.
GURL new_tab_url(chrome::kChromeUINewTabURL);
- controller().LoadURL(new_tab_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller().LoadURL(new_tab_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
rvh()->SendNavigate(page_id, new_tab_url);
// Navigate to another page.
GURL next_url("http://google.com/");
int next_page_id = page_id + 1;
- controller().LoadURL(next_url, GURL(), content::PAGE_TRANSITION_LINK,
+ controller().LoadURL(next_url, content::Referrer(),
+ content::PAGE_TRANSITION_LINK,
std::string());
TestRenderViewHost* old_rvh = rvh();
old_rvh->SendShouldCloseACK(true);
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view.cc ('k') | chrome/test/base/browser_with_test_window_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698