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

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

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « ash/wm/lock_layout_manager_unittest.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 // we enter maximize mode. 459 // we enter maximize mode.
460 TEST_F(MaximizeModeControllerTest, 460 TEST_F(MaximizeModeControllerTest,
461 NoKeyboardAccelerometerTriggersMaximizeMode) { 461 NoKeyboardAccelerometerTriggersMaximizeMode) {
462 ASSERT_FALSE(IsMaximizeModeStarted()); 462 ASSERT_FALSE(IsMaximizeModeStarted());
463 TriggerLidUpdate(gfx::Vector3dF(0.0f, 0.0f, kMeanGravity)); 463 TriggerLidUpdate(gfx::Vector3dF(0.0f, 0.0f, kMeanGravity));
464 ASSERT_TRUE(IsMaximizeModeStarted()); 464 ASSERT_TRUE(IsMaximizeModeStarted());
465 } 465 }
466 466
467 // Test if this case does not crash. See http://crbug.com/462806 467 // Test if this case does not crash. See http://crbug.com/462806
468 TEST_F(MaximizeModeControllerTest, DisplayDisconnectionDuringOverview) { 468 TEST_F(MaximizeModeControllerTest, DisplayDisconnectionDuringOverview) {
469 if (!SupportsMultipleDisplays())
470 return;
471
472 UpdateDisplay("800x600,800x600"); 469 UpdateDisplay("800x600,800x600");
473 std::unique_ptr<aura::Window> w1( 470 std::unique_ptr<aura::Window> w1(
474 CreateTestWindowInShellWithBounds(gfx::Rect(0, 0, 100, 100))); 471 CreateTestWindowInShellWithBounds(gfx::Rect(0, 0, 100, 100)));
475 std::unique_ptr<aura::Window> w2( 472 std::unique_ptr<aura::Window> w2(
476 CreateTestWindowInShellWithBounds(gfx::Rect(800, 0, 100, 100))); 473 CreateTestWindowInShellWithBounds(gfx::Rect(800, 0, 100, 100)));
477 ASSERT_NE(w1->GetRootWindow(), w2->GetRootWindow()); 474 ASSERT_NE(w1->GetRootWindow(), w2->GetRootWindow());
478 475
479 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); 476 maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
480 EXPECT_TRUE(WmShell::Get()->window_selector_controller()->ToggleOverview()); 477 EXPECT_TRUE(WmShell::Get()->window_selector_controller()->ToggleOverview());
481 478
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // accelerometer updates which would normally cause it to exit do not. 557 // accelerometer updates which would normally cause it to exit do not.
561 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) { 558 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) {
562 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); 559 maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
563 560
564 // Would normally trigger an exit from maximize mode. 561 // Would normally trigger an exit from maximize mode.
565 OpenLidToAngle(90.0f); 562 OpenLidToAngle(90.0f);
566 EXPECT_TRUE(IsMaximizeModeStarted()); 563 EXPECT_TRUE(IsMaximizeModeStarted());
567 } 564 }
568 565
569 } // namespace ash 566 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/lock_layout_manager_unittest.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698