OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // Second start, no fetching code is expected. | 221 // Second start, no fetching code is expected. |
222 auth_service()->Shutdown(); | 222 auth_service()->Shutdown(); |
223 EXPECT_EQ(ArcAuthService::State::STOPPED, auth_service()->state()); | 223 EXPECT_EQ(ArcAuthService::State::STOPPED, auth_service()->state()); |
224 EXPECT_EQ(ArcBridgeService::State::STOPPED, bridge_service()->state()); | 224 EXPECT_EQ(ArcBridgeService::State::STOPPED, bridge_service()->state()); |
225 auth_service()->OnPrimaryUserProfilePrepared(profile()); | 225 auth_service()->OnPrimaryUserProfilePrepared(profile()); |
226 EXPECT_TRUE(prefs->GetBoolean(prefs::kArcSignedIn)); | 226 EXPECT_TRUE(prefs->GetBoolean(prefs::kArcSignedIn)); |
227 EXPECT_EQ(ArcAuthService::State::ACTIVE, auth_service()->state()); | 227 EXPECT_EQ(ArcAuthService::State::ACTIVE, auth_service()->state()); |
228 EXPECT_EQ(ArcBridgeService::State::READY, bridge_service()->state()); | 228 EXPECT_EQ(ArcBridgeService::State::READY, bridge_service()->state()); |
229 | 229 |
230 // Report failure. | 230 // Report failure. |
231 auth_service()->OnSignInFailed(arc::ArcSignInFailureReason::UNKNOWN_ERROR); | 231 auth_service()->OnSignInFailed( |
| 232 arc::mojom::ArcSignInFailureReason::UNKNOWN_ERROR); |
232 EXPECT_FALSE(prefs->GetBoolean(prefs::kArcSignedIn)); | 233 EXPECT_FALSE(prefs->GetBoolean(prefs::kArcSignedIn)); |
233 EXPECT_EQ(ArcAuthService::State::STOPPED, auth_service()->state()); | 234 EXPECT_EQ(ArcAuthService::State::STOPPED, auth_service()->state()); |
234 EXPECT_EQ(ArcBridgeService::State::STOPPED, bridge_service()->state()); | 235 EXPECT_EQ(ArcBridgeService::State::STOPPED, bridge_service()->state()); |
235 | 236 |
236 // Correctly stop service. | 237 // Correctly stop service. |
237 auth_service()->Shutdown(); | 238 auth_service()->Shutdown(); |
238 } | 239 } |
239 | 240 |
240 } // namespace arc | 241 } // namespace arc |
OLD | NEW |