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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/invalidation/fake_invalidation_service.h" | 10 #include "chrome/browser/invalidation/fake_invalidation_service.h" |
11 #include "chrome/browser/invalidation/invalidation_service_factory.h" | 11 #include "chrome/browser/invalidation/invalidation_service_factory.h" |
12 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | 12 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" |
13 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 13 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" |
14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
15 #include "chrome/browser/signin/signin_manager_factory.h" | 15 #include "chrome/browser/signin/signin_manager_factory.h" |
16 #include "chrome/browser/sync/glue/data_type_manager_impl.h" | |
17 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" | 16 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" |
18 #include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" | 17 #include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" |
19 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" | 18 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" |
20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
21 #include "chrome/test/base/testing_pref_service_syncable.h" | 20 #include "chrome/test/base/testing_pref_service_syncable.h" |
22 #include "chrome/test/base/testing_profile.h" | 21 #include "chrome/test/base/testing_profile.h" |
23 #include "components/signin/core/browser/signin_manager.h" | 22 #include "components/signin/core/browser/signin_manager.h" |
| 23 #include "components/sync_driver/data_type_manager_impl.h" |
24 #include "components/sync_driver/pref_names.h" | 24 #include "components/sync_driver/pref_names.h" |
25 #include "content/public/test/test_browser_thread_bundle.h" | 25 #include "content/public/test/test_browser_thread_bundle.h" |
26 #include "google_apis/gaia/gaia_constants.h" | 26 #include "google_apis/gaia/gaia_constants.h" |
27 #include "testing/gmock/include/gmock/gmock.h" | 27 #include "testing/gmock/include/gmock/gmock.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
29 | 29 |
30 namespace browser_sync { | 30 namespace browser_sync { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 ACTION(ReturnNewDataTypeManager) { | 34 ACTION(ReturnNewDataTypeManager) { |
35 return new browser_sync::DataTypeManagerImpl(arg0, | 35 return new browser_sync::DataTypeManagerImpl(base::Closure(), |
| 36 arg0, |
36 arg1, | 37 arg1, |
37 arg2, | 38 arg2, |
38 arg3, | 39 arg3, |
39 arg4, | 40 arg4, |
40 arg5); | 41 arg5); |
41 } | 42 } |
42 | 43 |
43 using testing::StrictMock; | 44 using testing::StrictMock; |
44 using testing::_; | 45 using testing::_; |
45 | 46 |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 EXPECT_TRUE(token_status.next_token_request_time.is_null()); | 367 EXPECT_TRUE(token_status.next_token_request_time.is_null()); |
367 | 368 |
368 // Simulate successful connection. | 369 // Simulate successful connection. |
369 service()->OnConnectionStatusChange(syncer::CONNECTION_OK); | 370 service()->OnConnectionStatusChange(syncer::CONNECTION_OK); |
370 token_status = service()->GetSyncTokenStatus(); | 371 token_status = service()->GetSyncTokenStatus(); |
371 EXPECT_EQ(syncer::CONNECTION_OK, token_status.connection_status); | 372 EXPECT_EQ(syncer::CONNECTION_OK, token_status.connection_status); |
372 } | 373 } |
373 | 374 |
374 } // namespace | 375 } // namespace |
375 } // namespace browser_sync | 376 } // namespace browser_sync |
OLD | NEW |