| Index: chrome/browser/ui/views/arc_app_dialog_view_browsertest.cc
|
| diff --git a/chrome/browser/ui/views/arc_app_dialog_view_browsertest.cc b/chrome/browser/ui/views/arc_app_dialog_view_browsertest.cc
|
| index a3816d76afa6155ced9a858760628d0b67432499..977853e8230449520c4aa00b54fd401468d30c70 100644
|
| --- a/chrome/browser/ui/views/arc_app_dialog_view_browsertest.cc
|
| +++ b/chrome/browser/ui/views/arc_app_dialog_view_browsertest.cc
|
| @@ -16,7 +16,7 @@
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| -#include "chromeos/chromeos_switches.h"
|
| +#include "components/arc/arc_util.h"
|
| #include "components/arc/common/app.mojom.h"
|
| #include "components/arc/test/fake_app_instance.h"
|
| #include "content/public/test/test_utils.h"
|
| @@ -30,12 +30,19 @@ class ArcAppUninstallDialogViewBrowserTest : public InProcessBrowserTest {
|
| // InProcessBrowserTest:
|
| ~ArcAppUninstallDialogViewBrowserTest() override {}
|
|
|
| - void SetUpAppInstance() {
|
| - profile_ = browser()->profile();
|
| + void SetUpCommandLine(base::CommandLine* command_line) override {
|
| + InProcessBrowserTest::SetUpCommandLine(command_line);
|
| + arc::SetArcAvailableCommandLineForTesting(command_line);
|
| + }
|
|
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - chromeos::switches::kEnableArc);
|
| + void SetUpInProcessBrowserTestFixture() override {
|
| + InProcessBrowserTest::SetUpInProcessBrowserTestFixture();
|
| + ArcSessionManager::DisableUIForTesting();
|
| + }
|
|
|
| + void SetUpOnMainThread() override {
|
| + InProcessBrowserTest::SetUpOnMainThread();
|
| + profile_ = browser()->profile();
|
| arc_app_list_pref_ = ArcAppListPrefs::Get(profile_);
|
| if (!arc_app_list_pref_) {
|
| ArcAppListPrefsFactory::GetInstance()->RecreateServiceInstanceForTesting(
|
| @@ -44,8 +51,6 @@ class ArcAppUninstallDialogViewBrowserTest : public InProcessBrowserTest {
|
|
|
| ArcSessionManager* session_manager = ArcSessionManager::Get();
|
| DCHECK(session_manager);
|
| - ArcSessionManager::DisableUIForTesting();
|
| - session_manager->OnPrimaryUserProfilePrepared(profile_);
|
| session_manager->EnableArc();
|
|
|
| arc_app_list_pref_ = ArcAppListPrefs::Get(profile_);
|
| @@ -109,8 +114,6 @@ class ArcAppUninstallDialogViewBrowserTest : public InProcessBrowserTest {
|
| // share same package.
|
| IN_PROC_BROWSER_TEST_F(ArcAppUninstallDialogViewBrowserTest,
|
| UserConfirmsUninstall) {
|
| - SetUpAppInstance();
|
| -
|
| std::vector<std::string> app_ids = arc_app_list_pref()->GetAppIds();
|
| EXPECT_EQ(app_ids.size(), 2u);
|
| std::string package_name = base::StringPrintf("fake.package.%d", 0);
|
| @@ -145,8 +148,6 @@ IN_PROC_BROWSER_TEST_F(ArcAppUninstallDialogViewBrowserTest,
|
| // uninstalled when the shortcut is removed.
|
| IN_PROC_BROWSER_TEST_F(ArcAppUninstallDialogViewBrowserTest,
|
| UserConfirmsUninstallShortcut) {
|
| - SetUpAppInstance();
|
| -
|
| std::vector<std::string> app_ids = arc_app_list_pref()->GetAppIds();
|
| EXPECT_EQ(app_ids.size(), 2u);
|
| std::string package_name = base::StringPrintf("fake.package.%d", 0);
|
|
|