OLD | NEW |
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/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/net/gaia/token_service.h" | 9 #include "chrome/browser/net/gaia/token_service.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
11 #include "chrome/browser/sync/glue/data_type_manager.h" | 11 #include "chrome/browser/sync/glue/data_type_manager.h" |
12 #include "chrome/browser/sync/glue/data_type_manager_mock.h" | 12 #include "chrome/browser/sync/glue/data_type_manager_mock.h" |
13 #include "chrome/browser/sync/profile_sync_factory_mock.h" | 13 #include "chrome/browser/sync/profile_sync_factory_mock.h" |
14 #include "chrome/browser/sync/profile_sync_test_util.h" | 14 #include "chrome/browser/sync/profile_sync_test_util.h" |
15 #include "chrome/browser/sync/signin_manager.h" | 15 #include "chrome/browser/sync/signin_manager.h" |
16 #include "chrome/browser/sync/test_profile_sync_service.h" | 16 #include "chrome/browser/sync/test_profile_sync_service.h" |
17 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
18 #include "chrome/common/net/gaia/gaia_auth_consumer.h" | 18 #include "chrome/common/net/gaia/gaia_auth_consumer.h" |
19 #include "chrome/common/net/gaia/gaia_constants.h" | 19 #include "chrome/common/net/gaia/gaia_constants.h" |
20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "chrome/test/base/testing_browser_process_test.h" |
21 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
22 #include "chrome/test/testing_browser_process_test.h" | |
23 #include "content/browser/browser_thread.h" | 23 #include "content/browser/browser_thread.h" |
24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
25 | 25 |
26 using browser_sync::DataTypeManager; | 26 using browser_sync::DataTypeManager; |
27 using browser_sync::DataTypeManagerMock; | 27 using browser_sync::DataTypeManagerMock; |
28 using testing::_; | 28 using testing::_; |
29 using testing::AnyNumber; | 29 using testing::AnyNumber; |
30 using testing::DoAll; | 30 using testing::DoAll; |
31 using testing::InvokeArgument; | 31 using testing::InvokeArgument; |
32 using testing::Mock; | 32 using testing::Mock; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 // Preload the tokens. | 311 // Preload the tokens. |
312 profile_.GetTokenService()->IssueAuthTokenForTest( | 312 profile_.GetTokenService()->IssueAuthTokenForTest( |
313 GaiaConstants::kSyncService, "sync_token"); | 313 GaiaConstants::kSyncService, "sync_token"); |
314 service_->fail_initial_download(); | 314 service_->fail_initial_download(); |
315 | 315 |
316 service_->Initialize(); | 316 service_->Initialize(); |
317 EXPECT_FALSE(service_->sync_initialized()); | 317 EXPECT_FALSE(service_->sync_initialized()); |
318 EXPECT_FALSE(service_->GetBackendForTest()); | 318 EXPECT_FALSE(service_->GetBackendForTest()); |
319 } | 319 } |
OLD | NEW |