Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: chrome/browser/chromeos/arc/arc_session_manager_unittest.cc

Issue 2700783002: s/\bArc\b/ARC/g for ARC related code. (Closed)
Patch Set: Address ARC++ Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Create a second profile and set it as the active profile. 480 // Create a second profile and set it as the active profile.
481 const std::string email = "test@example.com"; 481 const std::string email = "test@example.com";
482 TestingProfile::Builder profile_builder; 482 TestingProfile::Builder profile_builder;
483 profile_builder.SetProfileName(email); 483 profile_builder.SetProfileName(email);
484 std::unique_ptr<TestingProfile> second_profile(profile_builder.Build()); 484 std::unique_ptr<TestingProfile> second_profile(profile_builder.Build());
485 const AccountId account_id(AccountId::FromUserEmail(email)); 485 const AccountId account_id(AccountId::FromUserEmail(email));
486 GetFakeUserManager()->AddUser(account_id); 486 GetFakeUserManager()->AddUser(account_id);
487 GetFakeUserManager()->SwitchActiveUser(account_id); 487 GetFakeUserManager()->SwitchActiveUser(account_id);
488 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true); 488 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true);
489 489
490 // Check that non-primary user can't use Arc. 490 // Check that non-primary user can't use ARC.
491 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get())); 491 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get()));
492 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get())); 492 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get()));
493 493
494 arc_session_manager()->Shutdown(); 494 arc_session_manager()->Shutdown();
495 } 495 }
496 496
497 TEST_F(ArcSessionManagerTest, RemoveDataFolder) { 497 TEST_F(ArcSessionManagerTest, RemoveDataFolder) {
498 profile()->GetPrefs()->SetBoolean(prefs::kArcEnabled, false); 498 profile()->GetPrefs()->SetBoolean(prefs::kArcEnabled, false);
499 // Starting session manager with prefs::kArcEnabled off automatically removes 499 // Starting session manager with prefs::kArcEnabled off automatically removes
500 // Android's data folder. 500 // Android's data folder.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 EXPECT_EQ(ArcSessionManager::State::SHOWING_TERMS_OF_SERVICE, 774 EXPECT_EQ(ArcSessionManager::State::SHOWING_TERMS_OF_SERVICE,
775 arc_session_manager()->state()); 775 arc_session_manager()->state());
776 CloseLoginDisplayHost(); 776 CloseLoginDisplayHost();
777 ReportActorDestroyed(); 777 ReportActorDestroyed();
778 EXPECT_EQ(ArcSessionManager::State::STOPPED, arc_session_manager()->state()); 778 EXPECT_EQ(ArcSessionManager::State::STOPPED, arc_session_manager()->state());
779 EXPECT_FALSE(!IsManagedUser() && 779 EXPECT_FALSE(!IsManagedUser() &&
780 arc_session_manager()->IsArcPlayStoreEnabled()); 780 arc_session_manager()->IsArcPlayStoreEnabled());
781 } 781 }
782 782
783 } // namespace arc 783 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698