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

Side by Side Diff: ash/display/display_configuration_controller_unittest.cc

Issue 2803933003: Adds ash_mus_unittests to FYI bot (Closed)
Patch Set: feedback Created 3 years, 8 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/common/test/ash_test.h ('k') | ash/display/mirror_window_controller_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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_shell.h" 5 #include "ash/common/wm_shell.h"
6 #include "ash/rotator/screen_rotation_animator.h" 6 #include "ash/rotator/screen_rotation_animator.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/test/display_configuration_controller_test_api.h" 9 #include "ash/test/display_configuration_controller_test_api.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/display/manager/display_manager.h" 11 #include "ui/display/manager/display_manager.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 class DisplayConfigurationControllerTest : public test::AshTestBase { 15 using DisplayConfigurationControllerTest = test::AshTestBase;
16 public:
17 DisplayConfigurationControllerTest() {}
18 ~DisplayConfigurationControllerTest() override {}
19
20 private:
21 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurationControllerTest);
22 };
23 16
24 TEST_F(DisplayConfigurationControllerTest, ErasesAnimatorOnAnimationEnded) { 17 TEST_F(DisplayConfigurationControllerTest, ErasesAnimatorOnAnimationEnded) {
25 // TODO(wutao): needs display_configuration_controller 18 // TODO(wutao): needs display_configuration_controller
26 // http://crbug.com/686839. 19 // http://crbug.com/686839.
27 if (WmShell::Get()->IsRunningInMash()) 20 if (WmShell::Get()->IsRunningInMash())
28 return; 21 return;
29 22
30 display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay(); 23 display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay();
31 test::DisplayConfigurationControllerTestApi testapi( 24 test::DisplayConfigurationControllerTestApi testapi(
32 Shell::Get()->display_configuration_controller()); 25 Shell::Get()->display_configuration_controller());
33 ScreenRotationAnimator* screen_rotation_animator = 26 ScreenRotationAnimator* screen_rotation_animator =
34 testapi.GetScreenRotationAnimatorForDisplay(display.id()); 27 testapi.GetScreenRotationAnimatorForDisplay(display.id());
35 EXPECT_EQ(1, testapi.DisplayScreenRotationAnimatorMapSize()); 28 EXPECT_EQ(1, testapi.DisplayScreenRotationAnimatorMapSize());
36 29
37 Shell::Get()->display_manager()->SetDisplayRotation( 30 Shell::Get()->display_manager()->SetDisplayRotation(
38 display.id(), display::Display::ROTATE_0, 31 display.id(), display::Display::ROTATE_0,
39 display::Display::RotationSource::ROTATION_SOURCE_USER); 32 display::Display::RotationSource::ROTATION_SOURCE_USER);
40 screen_rotation_animator->Rotate( 33 screen_rotation_animator->Rotate(
41 display::Display::ROTATE_90, 34 display::Display::ROTATE_90,
42 display::Display::RotationSource::ROTATION_SOURCE_USER); 35 display::Display::RotationSource::ROTATION_SOURCE_USER);
43 EXPECT_EQ(0, testapi.DisplayScreenRotationAnimatorMapSize()); 36 EXPECT_EQ(0, testapi.DisplayScreenRotationAnimatorMapSize());
44 } 37 }
45 38
46 } // namespace ash 39 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/test/ash_test.h ('k') | ash/display/mirror_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698