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

Side by Side Diff: chrome/browser/ui/app_list/app_list_controller_browsertest.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.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 "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 22 matching lines...) Expand all
33 #include "chromeos/chromeos_switches.h" 33 #include "chromeos/chromeos_switches.h"
34 #include "chromeos/login/user_names.h" 34 #include "chromeos/login/user_names.h"
35 #endif // defined(OS_CHROMEOS) 35 #endif // defined(OS_CHROMEOS)
36 36
37 // Browser Test for AppListController that runs on all platforms supporting 37 // Browser Test for AppListController that runs on all platforms supporting
38 // app_list. 38 // app_list.
39 typedef InProcessBrowserTest AppListControllerBrowserTest; 39 typedef InProcessBrowserTest AppListControllerBrowserTest;
40 40
41 // Test the CreateNewWindow function of the controller delegate. 41 // Test the CreateNewWindow function of the controller delegate.
42 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) { 42 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) {
43 const chrome::HostDesktopType desktop = chrome::GetActiveDesktop();
44 AppListService* service = test::GetAppListService(); 43 AppListService* service = test::GetAppListService();
45 AppListControllerDelegate* controller(service->GetControllerDelegate()); 44 AppListControllerDelegate* controller(service->GetControllerDelegate());
46 ASSERT_TRUE(controller); 45 ASSERT_TRUE(controller);
47 46
48 EXPECT_EQ(1U, chrome::GetBrowserCount(browser()->profile(), desktop)); 47 EXPECT_EQ(1U, chrome::GetBrowserCount(browser()->profile()));
49 EXPECT_EQ(0U, chrome::GetBrowserCount( 48 EXPECT_EQ(0U, chrome::GetBrowserCount(
50 browser()->profile()->GetOffTheRecordProfile(), desktop)); 49 browser()->profile()->GetOffTheRecordProfile()));
51 50
52 controller->CreateNewWindow(browser()->profile(), false); 51 controller->CreateNewWindow(browser()->profile(), false);
53 EXPECT_EQ(2U, chrome::GetBrowserCount(browser()->profile(), desktop)); 52 EXPECT_EQ(2U, chrome::GetBrowserCount(browser()->profile()));
54 53
55 controller->CreateNewWindow(browser()->profile(), true); 54 controller->CreateNewWindow(browser()->profile(), true);
56 EXPECT_EQ(1U, chrome::GetBrowserCount( 55 EXPECT_EQ(1U, chrome::GetBrowserCount(
57 browser()->profile()->GetOffTheRecordProfile(), desktop)); 56 browser()->profile()->GetOffTheRecordProfile()));
58 } 57 }
59 58
60 // Browser Test for AppListController that observes search result changes. 59 // Browser Test for AppListController that observes search result changes.
61 class AppListControllerSearchResultsBrowserTest 60 class AppListControllerSearchResultsBrowserTest
62 : public ExtensionBrowserTest, 61 : public ExtensionBrowserTest,
63 public app_list::SearchResultObserver, 62 public app_list::SearchResultObserver,
64 public ui::ListModelObserver { 63 public ui::ListModelObserver {
65 public: 64 public:
66 AppListControllerSearchResultsBrowserTest() 65 AppListControllerSearchResultsBrowserTest()
67 : observed_result_(NULL), 66 : observed_result_(NULL),
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Test creating the initial app list in guest mode. 199 // Test creating the initial app list in guest mode.
201 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) { 200 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) {
202 AppListService* service = test::GetAppListService(); 201 AppListService* service = test::GetAppListService();
203 EXPECT_TRUE(service->GetCurrentAppListProfile()); 202 EXPECT_TRUE(service->GetCurrentAppListProfile());
204 203
205 service->ShowForProfile(browser()->profile()); 204 service->ShowForProfile(browser()->profile());
206 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile()); 205 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile());
207 } 206 }
208 207
209 #endif // defined(OS_CHROMEOS) 208 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698