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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 18 matching lines...) Expand all
29 #include "chromeos/chromeos_switches.h" 29 #include "chromeos/chromeos_switches.h"
30 #include "chromeos/login/user_names.h" 30 #include "chromeos/login/user_names.h"
31 #endif // defined(OS_CHROMEOS) 31 #endif // defined(OS_CHROMEOS)
32 32
33 // Browser Test for AppListController that runs on all platforms supporting 33 // Browser Test for AppListController that runs on all platforms supporting
34 // app_list. 34 // app_list.
35 typedef InProcessBrowserTest AppListControllerBrowserTest; 35 typedef InProcessBrowserTest AppListControllerBrowserTest;
36 36
37 // Test the CreateNewWindow function of the controller delegate. 37 // Test the CreateNewWindow function of the controller delegate.
38 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) { 38 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) {
39 const chrome::HostDesktopType desktop = chrome::GetActiveDesktop(); 39 const ui::HostDesktopType desktop = chrome::GetActiveDesktop();
40 AppListService* service = test::GetAppListService(); 40 AppListService* service = test::GetAppListService();
41 AppListControllerDelegate* controller(service->GetControllerDelegate()); 41 AppListControllerDelegate* controller(service->GetControllerDelegate());
42 ASSERT_TRUE(controller); 42 ASSERT_TRUE(controller);
43 43
44 EXPECT_EQ(1U, chrome::GetBrowserCount(browser()->profile(), desktop)); 44 EXPECT_EQ(1U, chrome::GetBrowserCount(browser()->profile(), desktop));
45 EXPECT_EQ(0U, chrome::GetBrowserCount( 45 EXPECT_EQ(0U, chrome::GetBrowserCount(
46 browser()->profile()->GetOffTheRecordProfile(), desktop)); 46 browser()->profile()->GetOffTheRecordProfile(), desktop));
47 47
48 controller->CreateNewWindow(browser()->profile(), false); 48 controller->CreateNewWindow(browser()->profile(), false);
49 EXPECT_EQ(2U, chrome::GetBrowserCount(browser()->profile(), desktop)); 49 EXPECT_EQ(2U, chrome::GetBrowserCount(browser()->profile(), desktop));
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Test creating the initial app list in guest mode. 196 // Test creating the initial app list in guest mode.
197 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) { 197 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) {
198 AppListService* service = test::GetAppListService(); 198 AppListService* service = test::GetAppListService();
199 EXPECT_TRUE(service->GetCurrentAppListProfile()); 199 EXPECT_TRUE(service->GetCurrentAppListProfile());
200 200
201 service->ShowForProfile(browser()->profile()); 201 service->ShowForProfile(browser()->profile());
202 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile()); 202 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile());
203 } 203 }
204 204
205 #endif // defined(OS_CHROMEOS) 205 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698