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

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

Issue 2113053003: Moves Shell::maximize_mode_controller() to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 5 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay(); 83 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay();
84 } 84 }
85 85
86 void TearDown() override { 86 void TearDown() override {
87 chromeos::AccelerometerReader::GetInstance()->AddObserver( 87 chromeos::AccelerometerReader::GetInstance()->AddObserver(
88 maximize_mode_controller()); 88 maximize_mode_controller());
89 test::AshTestBase::TearDown(); 89 test::AshTestBase::TearDown();
90 } 90 }
91 91
92 MaximizeModeController* maximize_mode_controller() { 92 MaximizeModeController* maximize_mode_controller() {
93 return Shell::GetInstance()->maximize_mode_controller(); 93 return WmShell::Get()->maximize_mode_controller();
94 } 94 }
95 95
96 void TriggerLidUpdate(const gfx::Vector3dF& lid) { 96 void TriggerLidUpdate(const gfx::Vector3dF& lid) {
97 scoped_refptr<chromeos::AccelerometerUpdate> update( 97 scoped_refptr<chromeos::AccelerometerUpdate> update(
98 new chromeos::AccelerometerUpdate()); 98 new chromeos::AccelerometerUpdate());
99 update->Set(chromeos::ACCELEROMETER_SOURCE_SCREEN, lid.x(), lid.y(), 99 update->Set(chromeos::ACCELEROMETER_SOURCE_SCREEN, lid.x(), lid.y(),
100 lid.z()); 100 lid.z());
101 maximize_mode_controller()->OnAccelerometerUpdated(update); 101 maximize_mode_controller()->OnAccelerometerUpdated(update);
102 } 102 }
103 103
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // accelerometer updates which would normally cause it to exit do not. 527 // accelerometer updates which would normally cause it to exit do not.
528 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) { 528 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) {
529 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); 529 maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
530 530
531 // Would normally trigger an exit from maximize mode. 531 // Would normally trigger an exit from maximize mode.
532 OpenLidToAngle(90.0f); 532 OpenLidToAngle(90.0f);
533 EXPECT_TRUE(IsMaximizeModeStarted()); 533 EXPECT_TRUE(IsMaximizeModeStarted());
534 } 534 }
535 535
536 } // namespace ash 536 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/lock_state_controller_unittest.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698