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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/task.h" 10 #include "base/task.h"
11 #include "base/tracked_objects.h" 11 #include "base/tracked_objects.h"
12 #include "chrome/browser/sync/glue/change_processor_mock.h" 12 #include "chrome/browser/sync/glue/change_processor_mock.h"
13 #include "chrome/browser/sync/glue/data_type_controller_mock.h" 13 #include "chrome/browser/sync/glue/data_type_controller_mock.h"
14 #include "chrome/browser/sync/glue/model_associator_mock.h" 14 #include "chrome/browser/sync/glue/model_associator_mock.h"
15 #include "chrome/browser/sync/glue/preference_data_type_controller.h" 15 #include "chrome/browser/sync/glue/preference_data_type_controller.h"
16 #include "chrome/browser/sync/profile_sync_factory_mock.h" 16 #include "chrome/browser/sync/profile_sync_factory_mock.h"
17 #include "chrome/browser/sync/profile_sync_service_mock.h" 17 #include "chrome/browser/sync/profile_sync_service_mock.h"
18 #include "chrome/test/base/profile_mock.h" 18 #include "chrome/test/base/profile_mock.h"
19 #include "content/test/test_browser_thread.h" 19 #include "content/test/test_browser_thread.h"
20 20
21 using browser_sync::ChangeProcessorMock; 21 using browser_sync::ChangeProcessorMock;
22 using browser_sync::DataTypeController; 22 using browser_sync::DataTypeController;
23 using browser_sync::ModelAssociatorMock; 23 using browser_sync::ModelAssociatorMock;
24 using browser_sync::PreferenceDataTypeController; 24 using browser_sync::PreferenceDataTypeController;
25 using browser_sync::StartCallback; 25 using browser_sync::StartCallback;
26 using content::BrowserThread;
26 using testing::_; 27 using testing::_;
27 using testing::DoAll; 28 using testing::DoAll;
28 using testing::InvokeWithoutArgs; 29 using testing::InvokeWithoutArgs;
29 using testing::Return; 30 using testing::Return;
30 using testing::SetArgumentPointee; 31 using testing::SetArgumentPointee;
31 32
32 class PreferenceDataTypeControllerTest : public testing::Test { 33 class PreferenceDataTypeControllerTest : public testing::Test {
33 public: 34 public:
34 PreferenceDataTypeControllerTest() 35 PreferenceDataTypeControllerTest()
35 : ui_thread_(BrowserThread::UI, &message_loop_) {} 36 : ui_thread_(BrowserThread::UI, &message_loop_) {}
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 WillOnce(InvokeWithoutArgs(preference_dtc_.get(), 167 WillOnce(InvokeWithoutArgs(preference_dtc_.get(),
167 &PreferenceDataTypeController::Stop)); 168 &PreferenceDataTypeController::Stop));
168 SetStopExpectations(); 169 SetStopExpectations();
169 170
170 EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _)); 171 EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _));
171 preference_dtc_->Start(NewCallback(&start_callback_, &StartCallback::Run)); 172 preference_dtc_->Start(NewCallback(&start_callback_, &StartCallback::Run));
172 // This should cause preference_dtc_->Stop() to be called. 173 // This should cause preference_dtc_->Stop() to be called.
173 preference_dtc_->OnUnrecoverableError(FROM_HERE, "Test"); 174 preference_dtc_->OnUnrecoverableError(FROM_HERE, "Test");
174 PumpLoop(); 175 PumpLoop();
175 } 176 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/password_model_associator.cc ('k') | chrome/browser/sync/glue/search_engine_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698