Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ash/common/wm_shell.h" | |
| 6 #include "ash/rotator/screen_rotation_animator.h" | |
| 7 #include "ash/shell.h" | |
| 8 #include "ash/test/ash_test_base.h" | |
| 9 #include "ash/test/display_configuration_controller_test_api.h" | |
| 10 | |
| 11 namespace ash { | |
| 12 namespace test { | |
| 13 | |
| 14 class DisplayConfigurationControllerTest : public AshTestBase { | |
| 15 public: | |
| 16 DisplayConfigurationControllerTest() {} | |
| 17 ~DisplayConfigurationControllerTest() override {} | |
| 18 | |
| 19 private: | |
| 20 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurationControllerTest); | |
|
bruthig
2017/03/08 22:35:59
Missing "#include base/macros.h" for DISALLOW_COPY
wutao
2017/03/09 22:09:19
Done.
| |
| 21 }; | |
| 22 | |
| 23 TEST_F(DisplayConfigurationControllerTest, ErasesAnimatorOnAnimationEnded) { | |
| 24 // TODO(wutao): needs display_configuration_controller. | |
| 25 if (WmShell::Get()->IsRunningInMash()) | |
| 26 return; | |
| 27 | |
| 28 display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay(); | |
| 29 DisplayConfigurationControllerTestApi testapi( | |
| 30 Shell::GetInstance()->display_configuration_controller()); | |
| 31 ScreenRotationAnimator* screen_rotation_animator = | |
| 32 testapi.GetScreenRotationAnimatorForDisplay(display.id()); | |
| 33 EXPECT_EQ(1, testapi.DisplayScreenRotationAnimatorMapSize()); | |
| 34 | |
| 35 display.set_rotation(display::Display::ROTATE_0); | |
| 36 screen_rotation_animator->Rotate( | |
| 37 display::Display::ROTATE_90, | |
| 38 display::Display::RotationSource::ROTATION_SOURCE_USER); | |
| 39 EXPECT_EQ(0, testapi.DisplayScreenRotationAnimatorMapSize()); | |
| 40 } | |
| 41 | |
| 42 } // namespace test | |
| 43 } // namespace ash | |
| OLD | NEW |