Chromium Code Reviews| 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 <memory> | 5 #include <memory> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 | 281 |
| 282 TEST_F(ArcSessionManagerTest, SignInStatus) { | 282 TEST_F(ArcSessionManagerTest, SignInStatus) { |
| 283 PrefService* const prefs = profile()->GetPrefs(); | 283 PrefService* const prefs = profile()->GetPrefs(); |
| 284 | 284 |
| 285 EXPECT_FALSE(prefs->GetBoolean(prefs::kArcSignedIn)); | 285 EXPECT_FALSE(prefs->GetBoolean(prefs::kArcSignedIn)); |
| 286 prefs->SetBoolean(prefs::kArcEnabled, true); | 286 prefs->SetBoolean(prefs::kArcEnabled, true); |
| 287 | 287 |
| 288 arc_session_manager()->OnPrimaryUserProfilePrepared(profile()); | 288 arc_session_manager()->OnPrimaryUserProfilePrepared(profile()); |
| 289 EXPECT_EQ(ArcSessionManager::State::SHOWING_TERMS_OF_SERVICE, | 289 EXPECT_EQ(ArcSessionManager::State::SHOWING_TERMS_OF_SERVICE, |
| 290 arc_session_manager()->state()); | 290 arc_session_manager()->state()); |
| 291 // Emulate to accept the terms of service. | |
|
hidehiko
2016/11/29 17:43:29
Note: I seem to overlooked the real test failure f
| |
| 292 prefs->SetBoolean(prefs::kArcTermsAccepted, true); | |
| 291 arc_session_manager()->StartArc(); | 293 arc_session_manager()->StartArc(); |
| 292 EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state()); | 294 EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state()); |
| 293 EXPECT_TRUE(bridge_service()->ready()); | 295 EXPECT_TRUE(bridge_service()->ready()); |
| 294 EXPECT_FALSE(prefs->GetBoolean(prefs::kArcSignedIn)); | 296 EXPECT_FALSE(prefs->GetBoolean(prefs::kArcSignedIn)); |
| 295 arc_session_manager()->OnProvisioningFinished(ProvisioningResult::SUCCESS); | 297 arc_session_manager()->OnProvisioningFinished(ProvisioningResult::SUCCESS); |
| 296 EXPECT_TRUE(prefs->GetBoolean(prefs::kArcSignedIn)); | 298 EXPECT_TRUE(prefs->GetBoolean(prefs::kArcSignedIn)); |
| 297 EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state()); | 299 EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state()); |
| 298 EXPECT_TRUE(bridge_service()->ready()); | 300 EXPECT_TRUE(bridge_service()->ready()); |
| 299 | 301 |
| 300 // Second start, no fetching code is expected. | 302 // Second start, no fetching code is expected. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 369 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true); | 371 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true); |
| 370 | 372 |
| 371 // Check that non-primary user can't use Arc. | 373 // Check that non-primary user can't use Arc. |
| 372 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get())); | 374 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get())); |
| 373 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get())); | 375 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get())); |
| 374 | 376 |
| 375 arc_session_manager()->Shutdown(); | 377 arc_session_manager()->Shutdown(); |
| 376 } | 378 } |
| 377 | 379 |
| 378 } // namespace arc | 380 } // namespace arc |
| OLD | NEW |