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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc

Issue 1807743003: Remove HostDesktopType from AppLaunchParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp-parent
Patch Set: cros Created 4 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
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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 // still gets detected properly. 2078 // still gets detected properly.
2079 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, V1AppNavigation) { 2079 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, V1AppNavigation) {
2080 // We assume that the web store is always there (which it apparently is). 2080 // We assume that the web store is always there (which it apparently is).
2081 controller_->PinAppWithID(extensions::kWebStoreAppId); 2081 controller_->PinAppWithID(extensions::kWebStoreAppId);
2082 ash::ShelfID id = controller_->GetShelfIDForAppID( 2082 ash::ShelfID id = controller_->GetShelfIDForAppID(
2083 extensions::kWebStoreAppId); 2083 extensions::kWebStoreAppId);
2084 ASSERT_NE(0, id); 2084 ASSERT_NE(0, id);
2085 EXPECT_EQ(ash::STATUS_CLOSED, model_->ItemByID(id)->status); 2085 EXPECT_EQ(ash::STATUS_CLOSED, model_->ItemByID(id)->status);
2086 2086
2087 // Create a windowed application. 2087 // Create a windowed application.
2088 AppLaunchParams params( 2088 AppLaunchParams params = CreateAppLaunchParamsUserContainer(
2089 profile(), controller_->GetExtensionForAppID(extensions::kWebStoreAppId), 2089 profile(), controller_->GetExtensionForAppID(extensions::kWebStoreAppId),
2090 CURRENT_TAB, chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_TEST); 2090 NEW_FOREGROUND_TAB, extensions::SOURCE_TEST);
2091 params.container = extensions::LAUNCH_CONTAINER_WINDOW; 2091 params.container = extensions::LAUNCH_CONTAINER_WINDOW;
2092 OpenApplication(params); 2092 OpenApplication(params);
2093 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(id)->status); 2093 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(id)->status);
2094 2094
2095 // Find the browser which holds our app. 2095 // Find the browser which holds our app.
2096 Browser* app_browser = NULL; 2096 Browser* app_browser = NULL;
2097 const BrowserList* browser_list = BrowserList::GetInstance(); 2097 const BrowserList* browser_list = BrowserList::GetInstance();
2098 for (BrowserList::const_reverse_iterator it = 2098 for (BrowserList::const_reverse_iterator it =
2099 browser_list->begin_last_active(); 2099 browser_list->begin_last_active();
2100 it != browser_list->end_last_active() && !app_browser; ++it) { 2100 it != browser_list->end_last_active() && !app_browser; ++it) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 controller_->ActivateApp(bookmark_app->id(), ash::LAUNCH_FROM_APP_LIST, 0); 2235 controller_->ActivateApp(bookmark_app->id(), ash::LAUNCH_FROM_APP_LIST, 0);
2236 2236
2237 // There should be two new browsers. 2237 // There should be two new browsers.
2238 EXPECT_EQ(3u, chrome::GetBrowserCount(browser()->profile())); 2238 EXPECT_EQ(3u, chrome::GetBrowserCount(browser()->profile()));
2239 2239
2240 // The apps should now be running, with the last opened app active. 2240 // The apps should now be running, with the last opened app active.
2241 EXPECT_EQ(ash::STATUS_RUNNING, model_->ItemByID(hosted_app_shelf_id)->status); 2241 EXPECT_EQ(ash::STATUS_RUNNING, model_->ItemByID(hosted_app_shelf_id)->status);
2242 EXPECT_EQ(ash::STATUS_ACTIVE, 2242 EXPECT_EQ(ash::STATUS_ACTIVE,
2243 model_->ItemByID(bookmark_app_shelf_id)->status); 2243 model_->ItemByID(bookmark_app_shelf_id)->status);
2244 } 2244 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698