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

Unified Diff: chrome/browser/history/android/android_history_provider_service_unittest.cc

Issue 366133003: Change AndroidHistoryProviderService to use CancelableTaskTracker (3/6) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancelable_task_tracker.3
Patch Set: Fix unit tests Created 6 years, 5 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
Index: chrome/browser/history/android/android_history_provider_service_unittest.cc
diff --git a/chrome/browser/history/android/android_history_provider_service_unittest.cc b/chrome/browser/history/android/android_history_provider_service_unittest.cc
index 64db31c9906a9cbdbb0253aa2e41cbbb8d2926f8..8595ff21a0efcc76e89866f5061ad2c61dd000db 100644
--- a/chrome/browser/history/android/android_history_provider_service_unittest.cc
+++ b/chrome/browser/history/android/android_history_provider_service_unittest.cc
@@ -134,8 +134,7 @@ class CallbackHelper : public base::RefCountedThreadSafe<CallbackHelper> {
base::MessageLoop::current()->Quit();
}
- void OnStatementMoved(AndroidHistoryProviderService::Handle handle,
- int cursor_position) {
+ void OnStatementMoved(int cursor_position) {
cursor_position_ = cursor_position;
base::MessageLoop::current()->Quit();
}
@@ -184,8 +183,12 @@ TEST_F(AndroidHistoryProviderServiceTest, TestHistoryAndBookmark) {
// Move the cursor to the begining and verify whether we could get
// the same result.
AndroidStatement* statement = callback->statement();
- service_->MoveStatement(statement, 0, -1, &cancelable_consumer_,
- Bind(&CallbackHelper::OnStatementMoved, callback.get()));
+ service_->MoveStatement(
+ statement,
+ 0,
+ -1,
+ Bind(&CallbackHelper::OnStatementMoved, callback.get()),
+ &cancelable_tracker_);
base::MessageLoop::current()->Run();
EXPECT_EQ(-1, callback->cursor_position());
EXPECT_TRUE(callback->statement()->statement()->Step());
@@ -244,8 +247,12 @@ TEST_F(AndroidHistoryProviderServiceTest, TestSearchTerm) {
// Move the cursor to the begining and verify whether we could get
// the same result.
AndroidStatement* statement = callback->statement();
- service_->MoveStatement(statement, 0, -1, &cancelable_consumer_,
- Bind(&CallbackHelper::OnStatementMoved, callback.get()));
+ service_->MoveStatement(
+ statement,
+ 0,
+ -1,
+ Bind(&CallbackHelper::OnStatementMoved, callback.get()),
+ &cancelable_tracker_);
base::MessageLoop::current()->Run();
EXPECT_EQ(-1, callback->cursor_position());
EXPECT_TRUE(callback->statement()->statement()->Step());
« no previous file with comments | « chrome/browser/history/android/android_history_provider_service.cc ('k') | chrome/browser/history/android/sqlite_cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698