| 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 "chrome/browser/ui/app_list/arc/arc_app_dialog.h" | 5 #include "chrome/browser/ui/app_list/arc/arc_app_dialog.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/chromeos/arc/arc_auth_notification.h" | 9 #include "chrome/browser/chromeos/arc/arc_auth_notification.h" |
| 10 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 10 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 arc::SetArcAvailableCommandLineForTesting(command_line); | 37 arc::SetArcAvailableCommandLineForTesting(command_line); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void SetUpInProcessBrowserTestFixture() override { | 40 void SetUpInProcessBrowserTestFixture() override { |
| 41 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 41 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 42 ArcSessionManager::DisableUIForTesting(); | 42 ArcSessionManager::DisableUIForTesting(); |
| 43 ArcAuthNotification::DisableForTesting(); | 43 ArcAuthNotification::DisableForTesting(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void SetUpOnMainThread() override { | 46 void SetUpOnMainThread() override { |
| 47 InProcessBrowserTest::SetUpOnMainThread(); | |
| 48 profile_ = browser()->profile(); | 47 profile_ = browser()->profile(); |
| 49 arc_app_list_pref_ = ArcAppListPrefs::Get(profile_); | 48 arc_app_list_pref_ = ArcAppListPrefs::Get(profile_); |
| 50 if (!arc_app_list_pref_) { | 49 if (!arc_app_list_pref_) { |
| 51 ArcAppListPrefsFactory::GetInstance()->RecreateServiceInstanceForTesting( | 50 ArcAppListPrefsFactory::GetInstance()->RecreateServiceInstanceForTesting( |
| 52 profile_); | 51 profile_); |
| 53 } | 52 } |
| 54 | 53 |
| 55 arc::SetArcPlayStoreEnabledForProfile(profile_, true); | 54 arc::SetArcPlayStoreEnabledForProfile(profile_, true); |
| 56 | 55 |
| 57 arc_app_list_pref_ = ArcAppListPrefs::Get(profile_); | 56 arc_app_list_pref_ = ArcAppListPrefs::Get(profile_); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 content::RunAllPendingInMessageLoop(); | 171 content::RunAllPendingInMessageLoop(); |
| 173 | 172 |
| 174 EXPECT_TRUE(CloseAppDialogViewAndConfirmForTest(true)); | 173 EXPECT_TRUE(CloseAppDialogViewAndConfirmForTest(true)); |
| 175 content::RunAllPendingInMessageLoop(); | 174 content::RunAllPendingInMessageLoop(); |
| 176 app_ids = arc_app_list_pref()->GetAppIds(); | 175 app_ids = arc_app_list_pref()->GetAppIds(); |
| 177 EXPECT_EQ(app_ids.size(), 1u); | 176 EXPECT_EQ(app_ids.size(), 1u); |
| 178 controller->DismissView(); | 177 controller->DismissView(); |
| 179 } | 178 } |
| 180 | 179 |
| 181 } // namespace arc | 180 } // namespace arc |
| OLD | NEW |