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

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: 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 782f0075f4e84b9420735e66d3c2c489ded72668..db78f140331008b9dd3961585ca6449743be7350 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_test.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_test.cc
@@ -15,6 +15,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"
@@ -32,6 +33,14 @@ constexpr char kPackageName3[] = "fake.package.name3";
}
// static
+void ArcAppTest::Init(bool is_persistent_arc) {
hidehiko 2017/02/23 10:29:16 Could you move this to components/arc/arc_util, to
victorhsieh 2017/02/24 00:45:00 Done.
+ if (is_persistent_arc) {
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ chromeos::switches::kEnableArcPersistently);
+ }
+}
+
+// static
std::string ArcAppTest::GetAppId(const arc::mojom::AppInfo& app_info) {
return ArcAppListPrefs::GetAppId(app_info.package_name, app_info.activity);
}
@@ -93,9 +102,14 @@ void ArcAppTest::SetUp(Profile* profile) {
arc_app_list_pref_->SetDefaltAppsReadyCallback(run_loop.QuitClosure());
run_loop.Run();
- arc_session_manager_->SetArcPlayStoreEnabled(true);
// Check initial conditions.
- EXPECT_FALSE(arc_session_manager_->IsSessionRunning());
+ if (arc_session_manager_->IsPersistentArc()) {
+ // On Persistent ARC, Play Store is opted out by default.
+ EXPECT_TRUE(arc_session_manager_->IsSessionRunning());
+ } else {
+ arc_session_manager_->SetArcPlayStoreEnabled(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