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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 #endif | 97 #endif |
98 | 98 |
99 AshTestBase::SetUp(); | 99 AshTestBase::SetUp(); |
100 | 100 |
101 profile_manager_.reset( | 101 profile_manager_.reset( |
102 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); | 102 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
103 ASSERT_TRUE(profile_manager_->SetUp()); | 103 ASSERT_TRUE(profile_manager_->SetUp()); |
104 | 104 |
105 profile_ = profile_manager_->CreateTestingProfile(kTestAccountId); | 105 profile_ = profile_manager_->CreateTestingProfile(kTestAccountId); |
106 | 106 |
107 service_.reset(new ProfileSyncServiceMock( | 107 service_.reset(new browser_sync::ProfileSyncServiceMock( |
108 CreateProfileSyncServiceParamsForTest(profile_))); | 108 CreateProfileSyncServiceParamsForTest(profile_))); |
109 | 109 |
110 FakeLoginUIService* login_ui_service = static_cast<FakeLoginUIService*>( | 110 FakeLoginUIService* login_ui_service = static_cast<FakeLoginUIService*>( |
111 LoginUIServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 111 LoginUIServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
112 profile_, BuildMockLoginUIService)); | 112 profile_, BuildMockLoginUIService)); |
113 login_ui_service->SetLoginUI(&login_ui_); | 113 login_ui_service->SetLoginUI(&login_ui_); |
114 | 114 |
115 error_controller_.reset(new SyncErrorController(service_.get())); | 115 error_controller_.reset(new SyncErrorController(service_.get())); |
116 error_notifier_.reset(new SyncErrorNotifier(error_controller_.get(), | 116 error_notifier_.reset(new SyncErrorNotifier(error_controller_.get(), |
117 profile_)); | 117 profile_)); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 ASSERT_FALSE(notification); | 161 ASSERT_FALSE(notification); |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 #if defined(OS_WIN) | 165 #if defined(OS_WIN) |
166 std::unique_ptr<display::Screen> test_screen_; | 166 std::unique_ptr<display::Screen> test_screen_; |
167 #endif | 167 #endif |
168 std::unique_ptr<TestingProfileManager> profile_manager_; | 168 std::unique_ptr<TestingProfileManager> profile_manager_; |
169 std::unique_ptr<SyncErrorController> error_controller_; | 169 std::unique_ptr<SyncErrorController> error_controller_; |
170 std::unique_ptr<SyncErrorNotifier> error_notifier_; | 170 std::unique_ptr<SyncErrorNotifier> error_notifier_; |
171 std::unique_ptr<ProfileSyncServiceMock> service_; | 171 std::unique_ptr<browser_sync::ProfileSyncServiceMock> service_; |
172 TestingProfile* profile_; | 172 TestingProfile* profile_; |
173 FakeLoginUI login_ui_; | 173 FakeLoginUI login_ui_; |
174 NotificationUIManager* notification_ui_manager_; | 174 NotificationUIManager* notification_ui_manager_; |
175 | 175 |
176 private: | 176 private: |
177 DISALLOW_COPY_AND_ASSIGN(SyncErrorNotifierTest); | 177 DISALLOW_COPY_AND_ASSIGN(SyncErrorNotifierTest); |
178 }; | 178 }; |
179 | 179 |
180 } // namespace | 180 } // namespace |
181 | 181 |
(...skipping 49 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 |