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

Unified Diff: chrome/browser/ui/search/search_tab_helper_unittest.cc

Issue 940043002: Use GetPreferredDataTypes rather than GetActiveDataTypes when performing sync check for chrome sugg… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « chrome/browser/ui/search/search_tab_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_tab_helper_unittest.cc
diff --git a/chrome/browser/ui/search/search_tab_helper_unittest.cc b/chrome/browser/ui/search/search_tab_helper_unittest.cc
index 2d68d46159b3ddb884650d942a79f624cc836af2..7d1929683985ea94238afc0c39f9c9d8900bb594 100644
--- a/chrome/browser/ui/search/search_tab_helper_unittest.cc
+++ b/chrome/browser/ui/search/search_tab_helper_unittest.cc
@@ -106,12 +106,11 @@ class SearchTabHelperTest : public ChromeRenderViewHostTestHarness {
ProfileSyncServiceMock* sync_service = static_cast<ProfileSyncServiceMock*>(
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile()));
- EXPECT_CALL(*sync_service, SyncActive()).WillRepeatedly(Return(true));
syncer::ModelTypeSet result;
if (sync_history) {
result.Put(syncer::HISTORY_DELETE_DIRECTIVES);
}
- EXPECT_CALL(*sync_service, GetActiveDataTypes())
+ EXPECT_CALL(*sync_service, GetPreferredDataTypes())
.WillRepeatedly(Return(result));
}
@@ -280,26 +279,6 @@ TEST_F(SearchTabHelperTest, OnChromeIdentityCheckSignedOutMismatch) {
ASSERT_FALSE(get<1>(params));
}
-TEST_F(SearchTabHelperTest, OnHistorySyncCheckSyncInactive) {
- NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl));
- ProfileSyncServiceMock* sync_service = static_cast<ProfileSyncServiceMock*>(
- ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile()));
- EXPECT_CALL(*sync_service, SyncActive()).WillRepeatedly(Return(false));
- SearchTabHelper* search_tab_helper =
- SearchTabHelper::FromWebContents(web_contents());
- ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper);
-
- search_tab_helper->OnHistorySyncCheck();
-
- const IPC::Message* message = process()->sink().GetUniqueMessageMatching(
- ChromeViewMsg_HistorySyncCheckResult::ID);
- ASSERT_TRUE(message != NULL);
-
- ChromeViewMsg_HistorySyncCheckResult::Param params;
- ChromeViewMsg_HistorySyncCheckResult::Read(message, &params);
- ASSERT_FALSE(get<0>(params));
-}
-
TEST_F(SearchTabHelperTest, OnHistorySyncCheckSyncing) {
NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl));
SetHistorySync(true);
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698