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

Side by Side Diff: chrome/browser/sync/glue/favicon_cache_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/glue/favicon_cache.h" 5 #include "chrome/browser/sync/glue/favicon_cache.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "chrome/browser/history/history_notifications.h" 9 #include "chrome/browser/history/history_notifications.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 void OnCustomFaviconDataAvailable(const TestFaviconData& test_data); 288 void OnCustomFaviconDataAvailable(const TestFaviconData& test_data);
289 289
290 // Helper method to run the message loop after invoking 290 // Helper method to run the message loop after invoking
291 // OnReceivedSyncFavicon, which posts an internal task. 291 // OnReceivedSyncFavicon, which posts an internal task.
292 void TriggerSyncFaviconReceived(const GURL& page_url, 292 void TriggerSyncFaviconReceived(const GURL& page_url,
293 const GURL& icon_url, 293 const GURL& icon_url,
294 const std::string& icon_bytes, 294 const std::string& icon_bytes,
295 int64 last_visit_time_ms); 295 int64 last_visit_time_ms);
296 296
297 private: 297 private:
298 MessageLoopForUI message_loop_; 298 base::MessageLoopForUI message_loop_;
299 FaviconCache cache_; 299 FaviconCache cache_;
300 300
301 // Our dummy ChangeProcessor used to inspect changes pushed to Sync. 301 // Our dummy ChangeProcessor used to inspect changes pushed to Sync.
302 scoped_ptr<TestChangeProcessor> sync_processor_; 302 scoped_ptr<TestChangeProcessor> sync_processor_;
303 scoped_ptr<SyncChangeProcessorDelegate> sync_processor_delegate_; 303 scoped_ptr<SyncChangeProcessorDelegate> sync_processor_delegate_;
304 }; 304 };
305 305
306 SyncFaviconCacheTest::SyncFaviconCacheTest() 306 SyncFaviconCacheTest::SyncFaviconCacheTest()
307 : cache_(NULL, kMaxSyncFavicons), 307 : cache_(NULL, kMaxSyncFavicons),
308 sync_processor_(new TestChangeProcessor), 308 sync_processor_(new TestChangeProcessor),
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 EXPECT_NE(changes[1].sync_data().GetSpecifics().favicon_tracking(). 1567 EXPECT_NE(changes[1].sync_data().GetSpecifics().favicon_tracking().
1568 last_visit_time_ms(), 0); 1568 last_visit_time_ms(), 0);
1569 } 1569 }
1570 } 1570 }
1571 1571
1572 EXPECT_EQ(0U, GetTaskCount()); 1572 EXPECT_EQ(0U, GetTaskCount());
1573 EXPECT_EQ((unsigned long)kFaviconBatchSize, GetFaviconCount()); 1573 EXPECT_EQ((unsigned long)kFaviconBatchSize, GetFaviconCount());
1574 } 1574 }
1575 1575
1576 } // namespace browser_sync 1576 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/favicon_cache.cc ('k') | chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698