summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc')
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc45
1 files changed, 23 insertions, 22 deletions
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index bd0df8c7..38dc463 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -343,7 +343,7 @@ typedef LauncherPlatformAppBrowserTest ShelfAppBrowserMinimizeOnClick;
// Test that we can launch a platform app and get a running item.
IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, LaunchUnpinned) {
int item_count = shelf_model()->item_count();
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow* window = CreateAppWindow(extension);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -360,7 +360,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, LaunchPinned) {
int item_count = shelf_model()->item_count();
// First get app_id.
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
const std::string app_id = extension->id();
// Then create a shortcut.
@@ -390,7 +390,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, LaunchPinned) {
IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, PinRunning) {
// Run.
int item_count = shelf_model()->item_count();
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow* window = CreateAppWindow(extension);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -429,7 +429,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, UnpinRunning) {
int item_count = shelf_model()->item_count();
// First get app_id.
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
const std::string app_id = extension->id();
// Then create a shortcut.
@@ -477,7 +477,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, MultipleWindows) {
int item_count = shelf_model()->item_count();
// First run app.
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow* window1 = CreateAppWindow(extension);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -514,7 +514,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, MultipleApps) {
int item_count = shelf_model()->item_count();
// First run app.
- const Extension* extension1 = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow* window1 = CreateAppWindow(extension1);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -524,7 +524,8 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, MultipleApps) {
EXPECT_EQ(ash::STATUS_ACTIVE, item1.status);
// Then run second app.
- const Extension* extension2 = LoadAndLaunchPlatformApp("launch_2");
+ const Extension* extension2 = LoadAndLaunchPlatformApp("launch_2",
+ "Launched");
AppWindow* window2 = CreateAppWindow(extension2);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -555,7 +556,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, WindowActivation) {
int item_count = shelf_model()->item_count();
// First run app.
- const Extension* extension1 = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow* window1 = CreateAppWindow(extension1);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -565,7 +566,8 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, WindowActivation) {
EXPECT_EQ(ash::STATUS_ACTIVE, item1.status);
// Then run second app.
- const Extension* extension2 = LoadAndLaunchPlatformApp("launch_2");
+ const Extension* extension2 = LoadAndLaunchPlatformApp("launch_2",
+ "Launched");
AppWindow* window2 = CreateAppWindow(extension2);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -638,7 +640,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, InstallEphemeralApp) {
// Sanity check to verify that ChromeLauncherController::CanInstall() returns
// false for apps that are fully installed.
- const Extension* app = LoadAndLaunchPlatformApp("launch");
+ const Extension* app = LoadAndLaunchPlatformApp("launch", "Launched");
ASSERT_TRUE(app);
CreateAppWindow(app);
++item_count;
@@ -675,7 +677,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, InstallEphemeralApp) {
// Confirm that Click behavior for app windows is correnct.
IN_PROC_BROWSER_TEST_F(ShelfAppBrowserNoMinimizeOnClick, AppClickBehavior) {
// Launch a platform app and create a window for it.
- const Extension* extension1 = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow* window1 = CreateAppWindow(extension1);
EXPECT_TRUE(window1->GetNativeWindow()->IsVisible());
EXPECT_TRUE(window1->GetBaseWindow()->IsActive());
@@ -713,7 +715,7 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserNoMinimizeOnClick, AppClickBehavior) {
IN_PROC_BROWSER_TEST_F(ShelfAppBrowserMinimizeOnClick,
PackagedAppClickBehaviorInMinimizeMode) {
// Launch one platform app and create a window for it.
- const Extension* extension1 = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow* window1 = CreateAppWindow(extension1);
EXPECT_TRUE(window1->GetNativeWindow()->IsVisible());
EXPECT_TRUE(window1->GetBaseWindow()->IsActive());
@@ -773,7 +775,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, AppPanelClickBehavior) {
CommandLine::ForCurrentProcess()->AppendSwitch(
extensions::switches::kEnableExperimentalExtensionApis);
// Launch a platform app and create a panel window for it.
- const Extension* extension1 = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow::CreateParams params;
params.window_type = AppWindow::WINDOW_TYPE_PANEL;
params.focused = false;
@@ -807,7 +809,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, BrowserActivation) {
int item_count = shelf_model()->item_count();
// First run app.
- const Extension* extension1 = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
CreateAppWindow(extension1);
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
@@ -829,10 +831,8 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, SetIcon) {
extensions::switches::kEnableExperimentalExtensionApis);
int base_shelf_item_count = shelf_model()->item_count();
- ExtensionTestMessageListener launched_listener("Launched", false);
ExtensionTestMessageListener completed_listener("Completed", false);
- LoadAndLaunchPlatformApp("app_icon");
- ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
+ LoadAndLaunchPlatformApp("app_icon", "Launched");
ASSERT_TRUE(completed_listener.WaitUntilSatisfied());
// Now wait until the WebContent has decoded the icons and chrome has
@@ -1370,7 +1370,7 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, AltNumberTabsTabbing) {
IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest,
AltNumberAppsTabbing) {
// First run app.
- const Extension* extension1 = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
ui::BaseWindow* window1 = CreateAppWindow(extension1)->GetBaseWindow();
const ash::ShelfItem& item1 = GetLastLauncherItem();
ash::ShelfID app_id = item1.id;
@@ -1379,7 +1379,8 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest,
EXPECT_EQ(ash::TYPE_PLATFORM_APP, item1.type);
EXPECT_EQ(ash::STATUS_ACTIVE, item1.status);
- const Extension* extension2 = LoadAndLaunchPlatformApp("launch_2");
+ const Extension* extension2 = LoadAndLaunchPlatformApp("launch_2",
+ "Launched");
ui::BaseWindow* window2 = CreateAppWindow(extension2)->GetBaseWindow();
// By now the browser should be active. Issue Alt keystrokes several times to
@@ -1403,7 +1404,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest,
// Test that we can launch a platform app panel and get a running item.
IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, LaunchPanelWindow) {
int item_count = shelf_model()->item_count();
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow::CreateParams params;
params.window_type = AppWindow::WINDOW_TYPE_PANEL;
params.focused = false;
@@ -1422,7 +1423,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, LaunchPanelWindow) {
// Test that we get correct shelf presence with hidden app windows.
IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, HiddenAppWindows) {
int item_count = shelf_model()->item_count();
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow::CreateParams params;
// Create a hidden window.
@@ -1458,7 +1459,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, HiddenAppWindows) {
// Test attention states of windows.
IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, WindowAttentionStatus) {
- const Extension* extension = LoadAndLaunchPlatformApp("launch");
+ const Extension* extension = LoadAndLaunchPlatformApp("launch", "Launched");
AppWindow::CreateParams params;
params.window_type = AppWindow::WINDOW_TYPE_PANEL;
params.focused = false;