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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_test.cc

Issue 2707133006: Start ARC and sign in after Chrome OS login (Closed)
Patch Set: rebase then add test; NOTREACHED -> DCHECK 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/arc/arc_app_test.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_test.cc b/chrome/browser/ui/app_list/arc/arc_app_test.cc
index a529b2fb59fabe5b89ad35521622a74254b7f56b..7d4b18384b5276a446589c8c922fa3ad6350c60e 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_test.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_test.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h"
+#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service_manager.h"
@@ -101,9 +102,14 @@ void ArcAppTest::SetUp(Profile* profile) {
arc_app_list_pref_->SetDefaltAppsReadyCallback(run_loop.QuitClosure());
run_loop.Run();
- arc::SetArcPlayStoreEnabledForProfile(profile_, true);
// Check initial conditions.
- EXPECT_FALSE(arc_session_manager_->IsSessionRunning());
+ if (arc::ShouldArcAlwaysStart()) {
+ // When ARC first starts, it runs in opt-out mode of Play Store.
+ EXPECT_TRUE(arc_session_manager_->IsSessionRunning());
+ } else {
+ arc::SetArcPlayStoreEnabledForProfile(profile_, true);
+ EXPECT_FALSE(arc_session_manager_->IsSessionRunning());
+ }
app_instance_.reset(new arc::FakeAppInstance(arc_app_list_pref_));
arc_service_manager_->arc_bridge_service()->app()->SetInstance(

Powered by Google App Engine
This is Rietveld 408576698