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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc

Issue 1703403002: remove kDisableMinimizeOnSecondLauncherItemClick (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
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 56283f9aa59da3479c3688e78b08183ab6d7675d..824f2dcdda276413be09989529e15ebfc24d3d3a 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -377,26 +377,6 @@ class ShelfAppBrowserTestNoDefaultBrowser : public ShelfAppBrowserTest {
DISALLOW_COPY_AND_ASSIGN(ShelfAppBrowserTestNoDefaultBrowser);
};
-// Since the default for minimizing on click might change, I added both classes
-// to either get the minimize on click or not.
-class ShelfAppBrowserNoMinimizeOnClick : public LauncherPlatformAppBrowserTest {
- protected:
- ShelfAppBrowserNoMinimizeOnClick() {}
- ~ShelfAppBrowserNoMinimizeOnClick() override {}
-
- void SetUpCommandLine(base::CommandLine* command_line) override {
- LauncherPlatformAppBrowserTest::SetUpCommandLine(command_line);
- command_line->AppendSwitch(
- switches::kDisableMinimizeOnSecondLauncherItemClick);
- }
-
- private:
-
- DISALLOW_COPY_AND_ASSIGN(ShelfAppBrowserNoMinimizeOnClick);
-};
-
-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();
@@ -690,45 +670,8 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, WindowActivation) {
EXPECT_EQ(item_count, shelf_model()->item_count());
}
-// 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", "Launched");
- AppWindow* window1 = CreateAppWindow(extension1);
- EXPECT_TRUE(window1->GetNativeWindow()->IsVisible());
- EXPECT_TRUE(window1->GetBaseWindow()->IsActive());
- // Confirm that a controller item was created and is the correct state.
- const ash::ShelfItem& item1 = GetLastLauncherItem();
- LauncherItemController* item1_controller = GetItemController(item1.id);
- EXPECT_EQ(ash::TYPE_PLATFORM_APP, item1.type);
- EXPECT_EQ(ash::STATUS_ACTIVE, item1.status);
- EXPECT_EQ(LauncherItemController::TYPE_APP, item1_controller->type());
- // Clicking the item should have no effect.
- TestEvent click_event(ui::ET_MOUSE_PRESSED);
- item1_controller->ItemSelected(click_event);
- EXPECT_TRUE(window1->GetNativeWindow()->IsVisible());
- EXPECT_TRUE(window1->GetBaseWindow()->IsActive());
- // Minimize the window and confirm that the controller item is updated.
- window1->GetBaseWindow()->Minimize();
- EXPECT_FALSE(window1->GetNativeWindow()->IsVisible());
- EXPECT_FALSE(window1->GetBaseWindow()->IsActive());
- EXPECT_EQ(ash::STATUS_RUNNING, item1.status);
- // Clicking the item should activate the window.
- item1_controller->ItemSelected(click_event);
- EXPECT_TRUE(window1->GetNativeWindow()->IsVisible());
- EXPECT_TRUE(window1->GetBaseWindow()->IsActive());
- EXPECT_EQ(ash::STATUS_ACTIVE, item1.status);
- // Maximizing a window should preserve state after minimize + click.
- window1->GetBaseWindow()->Maximize();
- window1->GetBaseWindow()->Minimize();
- item1_controller->ItemSelected(click_event);
- EXPECT_TRUE(window1->GetNativeWindow()->IsVisible());
- EXPECT_TRUE(window1->GetBaseWindow()->IsActive());
- EXPECT_TRUE(window1->GetBaseWindow()->IsMaximized());
-}
-
// Confirm the minimizing click behavior for apps.
-IN_PROC_BROWSER_TEST_F(ShelfAppBrowserMinimizeOnClick,
+IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest,
PackagedAppClickBehaviorInMinimizeMode) {
// Launch one platform app and create a window for it.
const Extension* extension1 = LoadAndLaunchPlatformApp("launch", "Launched");
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698