summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 22:11:07 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 22:11:07 +0000
commitb588b77cec996e3f017344343f85bd5d1fdbb5eb (patch)
treeb9e221455b6cc27c6ec9bd79a6495bb7bfea89aa /chrome
parentecd9d87092866d04c00b5695ac56f0a026a6a2c8 (diff)
downloadchromium_src-b588b77cec996e3f017344343f85bd5d1fdbb5eb.zip
chromium_src-b588b77cec996e3f017344343f85bd5d1fdbb5eb.tar.gz
chromium_src-b588b77cec996e3f017344343f85bd5d1fdbb5eb.tar.bz2
Forgotten unit test chanes.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/back_forward_menu_model_unittest.cc3
-rw-r--r--chrome/browser/navigation_controller_unittest.cc17
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc3
-rw-r--r--chrome/browser/web_contents_unittest.cc3
4 files changed, 17 insertions, 9 deletions
diff --git a/chrome/browser/back_forward_menu_model_unittest.cc b/chrome/browser/back_forward_menu_model_unittest.cc
index 934fb1a..e2e04835a 100644
--- a/chrome/browser/back_forward_menu_model_unittest.cc
+++ b/chrome/browser/back_forward_menu_model_unittest.cc
@@ -34,7 +34,8 @@ class BackFwdMenuModelTestTabContents : public TabContents {
if (pending_entry->page_id() == -1) {
pending_entry->set_page_id(g_page_id_++);
}
- DidNavigateToEntry(pending_entry);
+ NavigationController::LoadCommittedDetails details;
+ DidNavigateToEntry(pending_entry, &details);
return true;
}
diff --git a/chrome/browser/navigation_controller_unittest.cc b/chrome/browser/navigation_controller_unittest.cc
index c90f4ff..bea08ac7 100644
--- a/chrome/browser/navigation_controller_unittest.cc
+++ b/chrome/browser/navigation_controller_unittest.cc
@@ -52,7 +52,8 @@ class TestContents : public TabContents {
void CompleteNavigation(int page_id) {
DCHECK(pending_entry_.get());
pending_entry_->set_page_id(page_id);
- DidNavigateToEntry(pending_entry_.get());
+ NavigationController::LoadCommittedDetails details;
+ DidNavigateToEntry(pending_entry_.get(), &details);
controller()->NotifyEntryChangedByPageID(type(), NULL, page_id);
pending_entry_.release();
}
@@ -451,7 +452,8 @@ TEST_F(NavigationControllerTest, LoadURL_NoPending) {
entry->set_page_id(2);
entry->set_url(kNewURL);
entry->set_title(L"Hello, world");
- contents->controller()->DidNavigateToEntry(entry);
+ NavigationController::LoadCommittedDetails details;
+ contents->controller()->DidNavigateToEntry(entry, &details);
// There should no longer be any pending entry, and the third navigation we
// just made should be committed.
@@ -487,7 +489,8 @@ TEST_F(NavigationControllerTest, LoadURL_NewPending) {
entry->set_page_id(3);
entry->set_url(kNewURL);
entry->set_title(L"Hello, world");
- contents->controller()->DidNavigateToEntry(entry);
+ NavigationController::LoadCommittedDetails details;
+ contents->controller()->DidNavigateToEntry(entry, &details);
// There should no longer be any pending entry, and the third navigation we
// just made should be committed.
@@ -533,7 +536,8 @@ TEST_F(NavigationControllerTest, LoadURL_ExistingPending) {
entry->set_page_id(3);
entry->set_url(kNewURL);
entry->set_title(L"Hello, world");
- contents->controller()->DidNavigateToEntry(entry);
+ NavigationController::LoadCommittedDetails details;
+ contents->controller()->DidNavigateToEntry(entry, &details);
// There should no longer be any pending entry, and the third navigation we
// just made should be committed.
@@ -758,7 +762,8 @@ TEST_F(NavigationControllerTest, Back_OtherBackPending) {
entry->set_page_id(1);
entry->set_url(kUrl2);
entry->set_title(kNewTitle1);
- contents->controller()->DidNavigateToEntry(entry);
+ NavigationController::LoadCommittedDetails details;
+ contents->controller()->DidNavigateToEntry(entry, &details);
// That second URL should be the last committed and it should have gotten the
// new title.
@@ -783,7 +788,7 @@ TEST_F(NavigationControllerTest, Back_OtherBackPending) {
entry->set_page_id(0);
entry->set_url(kUrl1);
entry->set_title(kNewTitle2);
- contents->controller()->DidNavigateToEntry(entry);
+ contents->controller()->DidNavigateToEntry(entry, &details);
// The navigation should not have affected the pending entry.
EXPECT_EQ(1, contents->controller()->GetPendingEntryIndex());
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 6d9cc14..492d9c8 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -37,7 +37,8 @@ class TabStripModelTestTabContents : public TabContents {
if (pending_entry->page_id() == -1) {
pending_entry->set_page_id(g_page_id_++);
}
- DidNavigateToEntry(pending_entry);
+ NavigationController::LoadCommittedDetails details;
+ DidNavigateToEntry(pending_entry, &details);
return true;
}
diff --git a/chrome/browser/web_contents_unittest.cc b/chrome/browser/web_contents_unittest.cc
index 26024da..515a963 100644
--- a/chrome/browser/web_contents_unittest.cc
+++ b/chrome/browser/web_contents_unittest.cc
@@ -303,9 +303,10 @@ class WebContentsTest : public testing::Test {
// Test to make sure that title updates get stripped of whitespace
TEST_F(WebContentsTest, OnMessageReceived) {
+ NavigationController::LoadCommittedDetails details;
contents->controller()->DidNavigateToEntry(new NavigationEntry(
contents->type(), contents->site_instance(), 0, GURL("about:blank"),
- std::wstring(), PageTransition::TYPED));
+ std::wstring(), PageTransition::TYPED), &details);
contents->UpdateTitle(NULL, 0, L" Lots O' Whitespace\n");
EXPECT_EQ(std::wstring(L"Lots O' Whitespace"), contents->GetTitle());