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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc

Issue 2499453002: Add ink drop ripple to overview mode button (Closed)
Patch Set: Rebased Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" 5 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 // Bounds for windows we know can be controlled. 1265 // Bounds for windows we know can be controlled.
1266 gfx::Rect rect1(10, 10, 200, 50); 1266 gfx::Rect rect1(10, 10, 200, 50);
1267 gfx::Rect rect2(10, 60, 200, 50); 1267 gfx::Rect rect2(10, 60, 200, 50);
1268 std::unique_ptr<aura::Window> w1( 1268 std::unique_ptr<aura::Window> w1(
1269 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect1)); 1269 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect1));
1270 std::unique_ptr<aura::Window> w2( 1270 std::unique_ptr<aura::Window> w2(
1271 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect2)); 1271 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect2));
1272 1272
1273 WindowSelectorController* window_selector_controller = 1273 WindowSelectorController* window_selector_controller =
1274 WmShell::Get()->window_selector_controller(); 1274 WmShell::Get()->window_selector_controller();
1275 window_selector_controller->ToggleOverview(); 1275 ASSERT_TRUE(window_selector_controller->ToggleOverview());
1276 ASSERT_TRUE(window_selector_controller->IsSelecting()); 1276 ASSERT_TRUE(window_selector_controller->IsSelecting());
1277 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); 1277 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager();
1278 ASSERT_TRUE(manager); 1278 ASSERT_TRUE(manager);
1279 EXPECT_FALSE(window_selector_controller->IsSelecting()); 1279 EXPECT_FALSE(window_selector_controller->IsSelecting());
1280 1280
1281 window_selector_controller->ToggleOverview(); 1281 ASSERT_TRUE(window_selector_controller->ToggleOverview());
1282 ASSERT_TRUE(window_selector_controller->IsSelecting()); 1282 ASSERT_TRUE(window_selector_controller->IsSelecting());
1283 // Destroy the manager again and check that the windows return to their 1283 // Destroy the manager again and check that the windows return to their
1284 // previous state. 1284 // previous state.
1285 DestroyMaximizeModeWindowManager(); 1285 DestroyMaximizeModeWindowManager();
1286 EXPECT_FALSE(window_selector_controller->IsSelecting()); 1286 EXPECT_FALSE(window_selector_controller->IsSelecting());
1287 } 1287 }
1288 1288
1289 // Test that an edge swipe from the top will end full screen mode. 1289 // Test that an edge swipe from the top will end full screen mode.
1290 TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeSwipeFromTop) { 1290 TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeSwipeFromTop) {
1291 gfx::Rect rect(10, 10, 200, 50); 1291 gfx::Rect rect(10, 10, 200, 50);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 EXPECT_EQ(1, observer.GetPostCountAndReset()); 1694 EXPECT_EQ(1, observer.GetPostCountAndReset());
1695 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED, 1695 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED,
1696 observer.GetLastOldStateAndReset()); 1696 observer.GetLastOldStateAndReset());
1697 1697
1698 window_state->RemoveObserver(&observer); 1698 window_state->RemoveObserver(&observer);
1699 1699
1700 DestroyMaximizeModeWindowManager(); 1700 DestroyMaximizeModeWindowManager();
1701 } 1701 }
1702 1702
1703 } // namespace ash 1703 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698