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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_controller_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_controller.h" 5 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 return; 470 return;
471 471
472 UpdateDisplay("800x600,800x600"); 472 UpdateDisplay("800x600,800x600");
473 std::unique_ptr<aura::Window> w1( 473 std::unique_ptr<aura::Window> w1(
474 CreateTestWindowInShellWithBounds(gfx::Rect(0, 0, 100, 100))); 474 CreateTestWindowInShellWithBounds(gfx::Rect(0, 0, 100, 100)));
475 std::unique_ptr<aura::Window> w2( 475 std::unique_ptr<aura::Window> w2(
476 CreateTestWindowInShellWithBounds(gfx::Rect(800, 0, 100, 100))); 476 CreateTestWindowInShellWithBounds(gfx::Rect(800, 0, 100, 100)));
477 ASSERT_NE(w1->GetRootWindow(), w2->GetRootWindow()); 477 ASSERT_NE(w1->GetRootWindow(), w2->GetRootWindow());
478 478
479 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); 479 maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
480 WmShell::Get()->window_selector_controller()->ToggleOverview(); 480 EXPECT_TRUE(WmShell::Get()->window_selector_controller()->ToggleOverview());
481 481
482 UpdateDisplay("800x600"); 482 UpdateDisplay("800x600");
483 EXPECT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting()); 483 EXPECT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
484 EXPECT_EQ(w1->GetRootWindow(), w2->GetRootWindow()); 484 EXPECT_EQ(w1->GetRootWindow(), w2->GetRootWindow());
485 } 485 }
486 486
487 // Test that the disabling of the internal display exits maximize mode, and that 487 // Test that the disabling of the internal display exits maximize mode, and that
488 // while disabled we do not re-enter maximize mode. 488 // while disabled we do not re-enter maximize mode.
489 TEST_F(MaximizeModeControllerTest, NoMaximizeModeWithDisabledInternalDisplay) { 489 TEST_F(MaximizeModeControllerTest, NoMaximizeModeWithDisabledInternalDisplay) {
490 UpdateDisplay("200x200, 200x200"); 490 UpdateDisplay("200x200, 200x200");
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // accelerometer updates which would normally cause it to exit do not. 560 // accelerometer updates which would normally cause it to exit do not.
561 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) { 561 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) {
562 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); 562 maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
563 563
564 // Would normally trigger an exit from maximize mode. 564 // Would normally trigger an exit from maximize mode.
565 OpenLidToAngle(90.0f); 565 OpenLidToAngle(90.0f);
566 EXPECT_TRUE(IsMaximizeModeStarted()); 566 EXPECT_TRUE(IsMaximizeModeStarted());
567 } 567 }
568 568
569 } // namespace ash 569 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698