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

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

Issue 2270553002: Move ash::DisplayInfo to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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
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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 UpdateDisplay("200x200, 200x200"); 490 UpdateDisplay("200x200, 200x200");
491 const int64_t internal_display_id = 491 const int64_t internal_display_id =
492 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay(); 492 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay();
493 ASSERT_FALSE(IsMaximizeModeStarted()); 493 ASSERT_FALSE(IsMaximizeModeStarted());
494 494
495 OpenLidToAngle(270.0f); 495 OpenLidToAngle(270.0f);
496 EXPECT_TRUE(IsMaximizeModeStarted()); 496 EXPECT_TRUE(IsMaximizeModeStarted());
497 EXPECT_TRUE(AreEventsBlocked()); 497 EXPECT_TRUE(AreEventsBlocked());
498 498
499 // Deactivate internal display to simulate Docked Mode. 499 // Deactivate internal display to simulate Docked Mode.
500 std::vector<DisplayInfo> secondary_only; 500 std::vector<display::ManagedDisplayInfo> secondary_only;
501 secondary_only.push_back( 501 secondary_only.push_back(
502 display_manager->GetDisplayInfo(display_manager->GetDisplayAt(1).id())); 502 display_manager->GetDisplayInfo(display_manager->GetDisplayAt(1).id()));
503 display_manager->OnNativeDisplaysChanged(secondary_only); 503 display_manager->OnNativeDisplaysChanged(secondary_only);
504 ASSERT_FALSE(display_manager->IsActiveDisplayId(internal_display_id)); 504 ASSERT_FALSE(display_manager->IsActiveDisplayId(internal_display_id));
505 EXPECT_FALSE(IsMaximizeModeStarted()); 505 EXPECT_FALSE(IsMaximizeModeStarted());
506 EXPECT_FALSE(AreEventsBlocked()); 506 EXPECT_FALSE(AreEventsBlocked());
507 507
508 OpenLidToAngle(270.0f); 508 OpenLidToAngle(270.0f);
509 EXPECT_FALSE(IsMaximizeModeStarted()); 509 EXPECT_FALSE(IsMaximizeModeStarted());
510 EXPECT_FALSE(AreEventsBlocked()); 510 EXPECT_FALSE(AreEventsBlocked());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // accelerometer updates which would normally cause it to exit do not. 559 // accelerometer updates which would normally cause it to exit do not.
560 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) { 560 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) {
561 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); 561 maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
562 562
563 // Would normally trigger an exit from maximize mode. 563 // Would normally trigger an exit from maximize mode.
564 OpenLidToAngle(90.0f); 564 OpenLidToAngle(90.0f);
565 EXPECT_TRUE(IsMaximizeModeStarted()); 565 EXPECT_TRUE(IsMaximizeModeStarted());
566 } 566 }
567 567
568 } // namespace ash 568 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/ash_native_cursor_manager_interactive_uitest.cc ('k') | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698