OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/history/android/android_history_provider_service.h" | 5 #include "chrome/browser/history/android/android_history_provider_service.h" |
6 | 6 |
7 #include "base/time.h" | 7 #include "base/time.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/history/android/android_history_types.h" | 9 #include "chrome/browser/history/android/android_history_types.h" |
10 #include "chrome/common/chrome_constants.h" | 10 #include "chrome/common/chrome_constants.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // The test cases in this file don't intent to test the detail features of | 27 // The test cases in this file don't intent to test the detail features of |
28 // Android content provider which have been covered by | 28 // Android content provider which have been covered by |
29 // android_provider_backend_unittest.cc, instead, they verify the code path to | 29 // android_provider_backend_unittest.cc, instead, they verify the code path to |
30 // AndroidProviderBackend working fine. | 30 // AndroidProviderBackend working fine. |
31 | 31 |
32 class AndroidHistoryProviderServiceTest : public testing::Test { | 32 class AndroidHistoryProviderServiceTest : public testing::Test { |
33 public: | 33 public: |
34 AndroidHistoryProviderServiceTest() | 34 AndroidHistoryProviderServiceTest() |
35 : profile_manager_( | 35 : profile_manager_( |
36 static_cast<TestingBrowserProcess*>(g_browser_process)), | 36 TestingBrowserProcess::GetGlobal()), |
37 ui_thread_(BrowserThread::UI, &message_loop_), | 37 ui_thread_(BrowserThread::UI, &message_loop_), |
38 file_thread_(BrowserThread::FILE, &message_loop_) { | 38 file_thread_(BrowserThread::FILE, &message_loop_) { |
39 } | 39 } |
40 virtual ~AndroidHistoryProviderServiceTest() { | 40 virtual ~AndroidHistoryProviderServiceTest() { |
41 } | 41 } |
42 | 42 |
43 protected: | 43 protected: |
44 virtual void SetUp() OVERRIDE { | 44 virtual void SetUp() OVERRIDE { |
45 // Setup the testing profile, so the bookmark_model_sql_handler could | 45 // Setup the testing profile, so the bookmark_model_sql_handler could |
46 // get the bookmark model from it. | 46 // get the bookmark model from it. |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 // Delete the row. | 253 // Delete the row. |
254 service_->DeleteSearchTerms(std::string(), std::vector<string16>(), | 254 service_->DeleteSearchTerms(std::string(), std::vector<string16>(), |
255 &cancelable_consumer_, Bind(&CallbackHelper::OnDeleted, callback.get())); | 255 &cancelable_consumer_, Bind(&CallbackHelper::OnDeleted, callback.get())); |
256 MessageLoop::current()->Run(); | 256 MessageLoop::current()->Run(); |
257 EXPECT_TRUE(callback->success()); | 257 EXPECT_TRUE(callback->success()); |
258 EXPECT_EQ(1, callback->count()); | 258 EXPECT_EQ(1, callback->count()); |
259 } | 259 } |
260 | 260 |
261 } // namespace | 261 } // namespace |
OLD | NEW |