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

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

Issue 684783004: Prefix CommandLine usage with base namespace (Part 4: ash/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 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
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | ash/wm/overview/window_grid.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 <math.h> 5 #include <math.h>
6 6
7 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 7 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
8 8
9 #include "ash/accelerometer/accelerometer_controller.h" 9 #include "ash/accelerometer/accelerometer_controller.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 gfx::Vector3dF(0.0f, -kMeanGravity, 0.0f)); 615 gfx::Vector3dF(0.0f, -kMeanGravity, 0.0f));
616 EXPECT_EQ(gfx::Display::ROTATE_0, GetInternalDisplayRotation()); 616 EXPECT_EQ(gfx::Display::ROTATE_0, GetInternalDisplayRotation());
617 } 617 }
618 618
619 class MaximizeModeControllerSwitchesTest : public MaximizeModeControllerTest { 619 class MaximizeModeControllerSwitchesTest : public MaximizeModeControllerTest {
620 public: 620 public:
621 MaximizeModeControllerSwitchesTest() {} 621 MaximizeModeControllerSwitchesTest() {}
622 ~MaximizeModeControllerSwitchesTest() override {} 622 ~MaximizeModeControllerSwitchesTest() override {}
623 623
624 void SetUp() override { 624 void SetUp() override {
625 CommandLine::ForCurrentProcess()->AppendSwitch( 625 base::CommandLine::ForCurrentProcess()->AppendSwitch(
626 switches::kAshEnableTouchViewTesting); 626 switches::kAshEnableTouchViewTesting);
627 MaximizeModeControllerTest::SetUp(); 627 MaximizeModeControllerTest::SetUp();
628 } 628 }
629 private: 629 private:
630 DISALLOW_COPY_AND_ASSIGN(MaximizeModeControllerSwitchesTest); 630 DISALLOW_COPY_AND_ASSIGN(MaximizeModeControllerSwitchesTest);
631 }; 631 };
632 632
633 // Tests that when the command line switch for testing maximize mode is on, that 633 // Tests that when the command line switch for testing maximize mode is on, that
634 // accelerometer updates which would normally cause it to exit do not, and that 634 // accelerometer updates which would normally cause it to exit do not, and that
635 // screen rotations still occur. 635 // screen rotations still occur.
636 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) { 636 TEST_F(MaximizeModeControllerSwitchesTest, IgnoreHingeAngles) {
637 maximize_mode_controller()->EnableMaximizeModeWindowManager(true); 637 maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
638 638
639 // Would normally trigger an exit from maximize mode. 639 // Would normally trigger an exit from maximize mode.
640 OpenLidToAngle(90.0f); 640 OpenLidToAngle(90.0f);
641 EXPECT_TRUE(IsMaximizeModeStarted()); 641 EXPECT_TRUE(IsMaximizeModeStarted());
642 642
643 TriggerAccelerometerUpdate(gfx::Vector3dF(-kMeanGravity, 0.0f, 0.0f), 643 TriggerAccelerometerUpdate(gfx::Vector3dF(-kMeanGravity, 0.0f, 0.0f),
644 gfx::Vector3dF(-kMeanGravity, 0.0f, 0.0f)); 644 gfx::Vector3dF(-kMeanGravity, 0.0f, 0.0f));
645 EXPECT_EQ(gfx::Display::ROTATE_90, GetInternalDisplayRotation()); 645 EXPECT_EQ(gfx::Display::ROTATE_90, GetInternalDisplayRotation());
646 } 646 }
647 647
648 } // namespace ash 648 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698