| OLD | NEW |
| 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 <math.h> | 5 #include <math.h> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 8 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 EXPECT_FALSE( | 440 EXPECT_FALSE( |
| 441 Shell::GetInstance()->window_selector_controller()->IsSelecting()); | 441 Shell::GetInstance()->window_selector_controller()->IsSelecting()); |
| 442 EXPECT_EQ(w1->GetRootWindow(), w2->GetRootWindow()); | 442 EXPECT_EQ(w1->GetRootWindow(), w2->GetRootWindow()); |
| 443 } | 443 } |
| 444 | 444 |
| 445 // Test that the disabling of the internal display exits maximize mode, and that | 445 // Test that the disabling of the internal display exits maximize mode, and that |
| 446 // while disabled we do not re-enter maximize mode. | 446 // while disabled we do not re-enter maximize mode. |
| 447 TEST_F(MaximizeModeControllerTest, NoMaximizeModeWithDisabledInternalDisplay) { | 447 TEST_F(MaximizeModeControllerTest, NoMaximizeModeWithDisabledInternalDisplay) { |
| 448 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 448 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
| 449 UpdateDisplay("200x200, 200x200"); | 449 UpdateDisplay("200x200, 200x200"); |
| 450 const int64 internal_display_id = | 450 const int64_t internal_display_id = |
| 451 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay(); | 451 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay(); |
| 452 ASSERT_FALSE(IsMaximizeModeStarted()); | 452 ASSERT_FALSE(IsMaximizeModeStarted()); |
| 453 | 453 |
| 454 OpenLidToAngle(270.0f); | 454 OpenLidToAngle(270.0f); |
| 455 EXPECT_TRUE(IsMaximizeModeStarted()); | 455 EXPECT_TRUE(IsMaximizeModeStarted()); |
| 456 | 456 |
| 457 // Deactivate internal display to simulate Docked Mode. | 457 // Deactivate internal display to simulate Docked Mode. |
| 458 std::vector<DisplayInfo> secondary_only; | 458 std::vector<DisplayInfo> secondary_only; |
| 459 secondary_only.push_back( | 459 secondary_only.push_back( |
| 460 display_manager->GetDisplayInfo(display_manager->GetDisplayAt(1).id())); | 460 display_manager->GetDisplayInfo(display_manager->GetDisplayAt(1).id())); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 484 // accelerometer updates which would normally cause it to exit do not. | 484 // accelerometer updates which would normally cause it to exit do not. |
| 485 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) { | 485 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) { |
| 486 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); | 486 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); |
| 487 | 487 |
| 488 // Would normally trigger an exit from maximize mode. | 488 // Would normally trigger an exit from maximize mode. |
| 489 OpenLidToAngle(90.0f); | 489 OpenLidToAngle(90.0f); |
| 490 EXPECT_TRUE(IsMaximizeModeStarted()); | 490 EXPECT_TRUE(IsMaximizeModeStarted()); |
| 491 } | 491 } |
| 492 | 492 |
| 493 } // namespace ash | 493 } // namespace ash |
| OLD | NEW |