| Index: chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
|
| index 426182910e8499c34a061e70dd4235f80a3c3530..baf331af2dee5ad91441c1c2c0da9d3238c42175 100644
|
| --- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
|
| +++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
|
| @@ -357,6 +357,15 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
|
| rows));
|
| }
|
|
|
| + void SendNotificationURLsDeleted(
|
| + const history::URLsDeletedDetails& deleted_details) {
|
| + SendNotification(base::Bind(&HistoryBackendNotifier::NotifyURLsDeleted,
|
| + base::Unretained(history_backend_.get()),
|
| + deleted_details.all_history,
|
| + deleted_details.expired, deleted_details.rows,
|
| + deleted_details.favicon_urls));
|
| + }
|
| +
|
| static bool URLsEqual(history::URLRow& lhs, history::URLRow& rhs) {
|
| // Only verify the fields we explicitly sync (i.e. don't verify typed_count
|
| // or visit_count because we rely on the history DB to manage those values
|
| @@ -846,10 +855,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeRemove) {
|
| changes.rows.push_back(history::URLRow(GURL("http://mine.com")));
|
| scoped_refptr<ThreadNotifier> notifier(
|
| new ThreadNotifier(history_thread_.get()));
|
| - notifier->Notify(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
|
| - content::Source<Profile>(profile_),
|
| - content::Details<history::URLsDeletedDetails>(&changes));
|
| -
|
| + SendNotificationURLsDeleted(changes);
|
| history::URLRows new_sync_entries;
|
| GetTypedUrlsFromSyncDB(&new_sync_entries);
|
| ASSERT_EQ(1U, new_sync_entries.size());
|
| @@ -885,10 +891,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeRemoveExpired) {
|
| changes.rows.push_back(history::URLRow(GURL("http://mine.com")));
|
| scoped_refptr<ThreadNotifier> notifier(
|
| new ThreadNotifier(history_thread_.get()));
|
| - notifier->Notify(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
|
| - content::Source<Profile>(profile_),
|
| - content::Details<history::URLsDeletedDetails>(&changes));
|
| -
|
| + SendNotificationURLsDeleted(changes);
|
| history::URLRows new_sync_entries;
|
| GetTypedUrlsFromSyncDB(&new_sync_entries);
|
| // Both URLs should still be there.
|
| @@ -925,9 +928,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeRemoveAll) {
|
| changes.all_history = true;
|
| scoped_refptr<ThreadNotifier> notifier(
|
| new ThreadNotifier(history_thread_.get()));
|
| - notifier->Notify(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
|
| - content::Source<Profile>(profile_),
|
| - content::Details<history::URLsDeletedDetails>(&changes));
|
| + SendNotificationURLsDeleted(changes);
|
|
|
| GetTypedUrlsFromSyncDB(&new_sync_entries);
|
| ASSERT_EQ(0U, new_sync_entries.size());
|
|
|