Chromium Code Reviews| 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_session_manager.h" | 10 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| 10 #include "chrome/browser/chromeos/arc/arc_util.h" | 11 #include "chrome/browser/chromeos/arc/arc_util.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 13 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| 13 #include "chrome/browser/ui/app_list/app_list_service.h" | 14 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 14 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 15 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 15 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h" | 16 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h" |
| 16 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" | 17 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
| 17 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| 18 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 32 ~ArcAppUninstallDialogViewBrowserTest() override {} | 33 ~ArcAppUninstallDialogViewBrowserTest() override {} |
| 33 | 34 |
| 34 void SetUpCommandLine(base::CommandLine* command_line) override { | 35 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 35 InProcessBrowserTest::SetUpCommandLine(command_line); | 36 InProcessBrowserTest::SetUpCommandLine(command_line); |
| 36 arc::SetArcAvailableCommandLineForTesting(command_line); | 37 arc::SetArcAvailableCommandLineForTesting(command_line); |
| 37 } | 38 } |
| 38 | 39 |
| 39 void SetUpInProcessBrowserTestFixture() override { | 40 void SetUpInProcessBrowserTestFixture() override { |
| 40 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 41 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 41 ArcSessionManager::DisableUIForTesting(); | 42 ArcSessionManager::DisableUIForTesting(); |
| 43 ArcAuthNotification::DisableForTesting(); | |
|
msw
2017/03/02 00:25:43
nit: mention splitting out the auth disabling in y
hidehiko
2017/03/02 02:21:57
Done.
| |
| 42 } | 44 } |
| 43 | 45 |
| 44 void SetUpOnMainThread() override { | 46 void SetUpOnMainThread() override { |
| 45 InProcessBrowserTest::SetUpOnMainThread(); | 47 InProcessBrowserTest::SetUpOnMainThread(); |
| 46 profile_ = browser()->profile(); | 48 profile_ = browser()->profile(); |
| 47 arc_app_list_pref_ = ArcAppListPrefs::Get(profile_); | 49 arc_app_list_pref_ = ArcAppListPrefs::Get(profile_); |
| 48 if (!arc_app_list_pref_) { | 50 if (!arc_app_list_pref_) { |
| 49 ArcAppListPrefsFactory::GetInstance()->RecreateServiceInstanceForTesting( | 51 ArcAppListPrefsFactory::GetInstance()->RecreateServiceInstanceForTesting( |
| 50 profile_); | 52 profile_); |
| 51 } | 53 } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 content::RunAllPendingInMessageLoop(); | 172 content::RunAllPendingInMessageLoop(); |
| 171 | 173 |
| 172 EXPECT_TRUE(CloseAppDialogViewAndConfirmForTest(true)); | 174 EXPECT_TRUE(CloseAppDialogViewAndConfirmForTest(true)); |
| 173 content::RunAllPendingInMessageLoop(); | 175 content::RunAllPendingInMessageLoop(); |
| 174 app_ids = arc_app_list_pref()->GetAppIds(); | 176 app_ids = arc_app_list_pref()->GetAppIds(); |
| 175 EXPECT_EQ(app_ids.size(), 1u); | 177 EXPECT_EQ(app_ids.size(), 1u); |
| 176 controller->DismissView(); | 178 controller->DismissView(); |
| 177 } | 179 } |
| 178 | 180 |
| 179 } // namespace arc | 181 } // namespace arc |
| OLD | NEW |