OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_error_notifier_ash.h" | 5 #include "chrome/browser/sync/sync_error_notifier_ash.h" |
6 | 6 |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/notifications/notification.h" | 10 #include "chrome/browser/notifications/notification.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 int focus_ui_call_count() const { return focus_ui_call_count_; } | 75 int focus_ui_call_count() const { return focus_ui_call_count_; } |
76 | 76 |
77 private: | 77 private: |
78 // LoginUIService::LoginUI: | 78 // LoginUIService::LoginUI: |
79 void FocusUI() override { ++focus_ui_call_count_; } | 79 void FocusUI() override { ++focus_ui_call_count_; } |
80 void CloseUI() override {} | 80 void CloseUI() override {} |
81 | 81 |
82 int focus_ui_call_count_; | 82 int focus_ui_call_count_; |
83 }; | 83 }; |
84 | 84 |
85 KeyedService* BuildMockLoginUIService( | 85 scoped_ptr<KeyedService> BuildMockLoginUIService( |
86 content::BrowserContext* profile) { | 86 content::BrowserContext* profile) { |
87 return new FakeLoginUIService(); | 87 return make_scoped_ptr(new FakeLoginUIService()); |
88 } | 88 } |
89 | 89 |
90 class SyncErrorNotifierTest : public AshTestBase { | 90 class SyncErrorNotifierTest : public AshTestBase { |
91 public: | 91 public: |
92 SyncErrorNotifierTest() {} | 92 SyncErrorNotifierTest() {} |
93 ~SyncErrorNotifierTest() override {} | 93 ~SyncErrorNotifierTest() override {} |
94 | 94 |
95 void SetUp() override { | 95 void SetUp() override { |
96 profile_manager_.reset( | 96 profile_manager_.reset( |
97 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); | 97 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 SCOPED_TRACE("Not expecting notification since sync setup is incomplete"); | 231 SCOPED_TRACE("Not expecting notification since sync setup is incomplete"); |
232 VerifySyncErrorNotifierResult( | 232 VerifySyncErrorNotifierResult( |
233 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, | 233 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, |
234 false /* not signed in */, | 234 false /* not signed in */, |
235 false /* no error */); | 235 false /* no error */); |
236 } | 236 } |
237 } | 237 } |
238 | 238 |
239 } // namespace test | 239 } // namespace test |
240 } // namespace ash | 240 } // namespace ash |
OLD | NEW |