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

Side by Side Diff: chrome/browser/ui/views/arc_app_dialog_view_browsertest.cc

Issue 2723073002: Extract kArcEnabled preference from ArcSessionManager part 2. (Closed)
Patch Set: address comments Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698