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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 using ::testing::NiceMock; | 26 using ::testing::NiceMock; |
27 using ::testing::Return; | 27 using ::testing::Return; |
28 using ::testing::ReturnRef; | 28 using ::testing::ReturnRef; |
29 using ::testing::_; | 29 using ::testing::_; |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 class FakeLoginUIService: public LoginUIService { | 33 class FakeLoginUIService: public LoginUIService { |
34 public: | 34 public: |
35 FakeLoginUIService() : LoginUIService(NULL) {} | 35 FakeLoginUIService() : LoginUIService(nullptr) {} |
36 }; | 36 }; |
37 | 37 |
38 class FakeLoginUI : public LoginUIService::LoginUI { | 38 class FakeLoginUI : public LoginUIService::LoginUI { |
39 public: | 39 public: |
40 FakeLoginUI() : focus_ui_call_count_(0) {} | 40 FakeLoginUI() : focus_ui_call_count_(0) {} |
41 | 41 |
42 ~FakeLoginUI() override {} | 42 ~FakeLoginUI() override {} |
43 | 43 |
44 int focus_ui_call_count() const { return focus_ui_call_count_; } | 44 int focus_ui_call_count() const { return focus_ui_call_count_; } |
45 | 45 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 .WillRepeatedly(Return(true)); | 169 .WillRepeatedly(Return(true)); |
170 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) | 170 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) |
171 .WillRepeatedly(Return(true)); | 171 .WillRepeatedly(Return(true)); |
172 VerifySyncGlobalErrorResult( | 172 VerifySyncGlobalErrorResult( |
173 &service, login_ui_service, browser(), &error, &global_error, | 173 &service, login_ui_service, browser(), &error, &global_error, |
174 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, | 174 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, |
175 false /* not signed in */, false /* no error */); | 175 false /* not signed in */, false /* no error */); |
176 | 176 |
177 global_error.Shutdown(); | 177 global_error.Shutdown(); |
178 } | 178 } |
OLD | NEW |