OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/external_provider_impl.h" | 5 #include "chrome/browser/extensions/external_provider_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId)); | 148 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId)); |
149 } | 149 } |
150 | 150 |
151 // User signed in, sync service started, install app when sync is disabled by | 151 // User signed in, sync service started, install app when sync is disabled by |
152 // policy. | 152 // policy. |
153 TEST_F(ExternalProviderImplChromeOSTest, PolicyDisabled) { | 153 TEST_F(ExternalProviderImplChromeOSTest, PolicyDisabled) { |
154 InitServiceWithExternalProviders(true); | 154 InitServiceWithExternalProviders(true); |
155 | 155 |
156 // Log user in, start sync. | 156 // Log user in, start sync. |
157 TestingBrowserProcess::GetGlobal()->SetProfileManager( | 157 TestingBrowserProcess::GetGlobal()->SetProfileManager( |
158 new ProfileManagerWithoutInit(temp_dir().path())); | 158 new ProfileManagerWithoutInit(temp_dir().GetPath())); |
159 SigninManagerBase* signin = | 159 SigninManagerBase* signin = |
160 SigninManagerFactory::GetForProfile(profile_.get()); | 160 SigninManagerFactory::GetForProfile(profile_.get()); |
161 signin->SetAuthenticatedAccountInfo("gaia-id-test_user@gmail.com", | 161 signin->SetAuthenticatedAccountInfo("gaia-id-test_user@gmail.com", |
162 "test_user@gmail.com"); | 162 "test_user@gmail.com"); |
163 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_.get()) | 163 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_.get()) |
164 ->UpdateCredentials("test_user@gmail.com", "oauth2_login_token"); | 164 ->UpdateCredentials("test_user@gmail.com", "oauth2_login_token"); |
165 | 165 |
166 // App sync will wait for priority sync to complete. | 166 // App sync will wait for priority sync to complete. |
167 service_->CheckForExternalUpdates(); | 167 service_->CheckForExternalUpdates(); |
168 | 168 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 new syncer::SyncErrorFactoryMock())); | 203 new syncer::SyncErrorFactoryMock())); |
204 | 204 |
205 content::WindowedNotificationObserver( | 205 content::WindowedNotificationObserver( |
206 extensions::NOTIFICATION_CRX_INSTALLER_DONE, | 206 extensions::NOTIFICATION_CRX_INSTALLER_DONE, |
207 content::NotificationService::AllSources()).Wait(); | 207 content::NotificationService::AllSources()).Wait(); |
208 | 208 |
209 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId)); | 209 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId)); |
210 } | 210 } |
211 | 211 |
212 } // namespace extensions | 212 } // namespace extensions |
OLD | NEW |