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/sync/sync_global_error.h" | 5 #include "chrome/browser/sync/sync_global_error.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/sync/profile_sync_service_mock.h" | 9 #include "chrome/browser/sync/profile_sync_service_mock.h" |
10 #include "chrome/browser/sync/sync_error_controller.h" | |
11 #include "chrome/browser/sync/sync_global_error_factory.h" | 10 #include "chrome/browser/sync/sync_global_error_factory.h" |
12 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 12 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
14 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 13 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
15 #include "chrome/test/base/browser_with_test_window_test.h" | 14 #include "chrome/test/base/browser_with_test_window_test.h" |
16 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
| 16 #include "components/sync_driver/sync_error_controller.h" |
17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
19 #include "content/public/browser/notification_source.h" | 19 #include "content/public/browser/notification_source.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 using ::testing::NiceMock; | 23 using ::testing::NiceMock; |
24 using ::testing::Return; | 24 using ::testing::Return; |
25 using ::testing::ReturnRef; | 25 using ::testing::ReturnRef; |
26 using ::testing::_; | 26 using ::testing::_; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 .WillRepeatedly(Return(true)); | 159 .WillRepeatedly(Return(true)); |
160 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) | 160 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) |
161 .WillRepeatedly(Return(true)); | 161 .WillRepeatedly(Return(true)); |
162 VerifySyncGlobalErrorResult( | 162 VerifySyncGlobalErrorResult( |
163 &service, login_ui_service, browser(), &error, &global_error, | 163 &service, login_ui_service, browser(), &error, &global_error, |
164 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, | 164 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, |
165 false /* not signed in */, false /* no error */); | 165 false /* not signed in */, false /* no error */); |
166 | 166 |
167 global_error.Shutdown(); | 167 global_error.Shutdown(); |
168 } | 168 } |
OLD | NEW |