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

Unified Diff: ash/display/display_configuration_controller_unittest.cc

Issue 2790583004: Add second copy request after screen rotation to flatten the layers in animation. (Closed)
Patch Set: Separate the two test sets for slow/smooth animation. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/display_configuration_controller.cc ('k') | ash/display/root_window_transformers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_configuration_controller_unittest.cc
diff --git a/ash/display/display_configuration_controller_unittest.cc b/ash/display/display_configuration_controller_unittest.cc
index d1658af667d8dfe07f2cece874d62e604384af25..6b99ad2f02ec907984f840b9362e1d8594ad6374 100644
--- a/ash/display/display_configuration_controller_unittest.cc
+++ b/ash/display/display_configuration_controller_unittest.cc
@@ -14,7 +14,7 @@ namespace ash {
using DisplayConfigurationControllerTest = test::AshTestBase;
-TEST_F(DisplayConfigurationControllerTest, ErasesAnimatorOnAnimationEnded) {
+TEST_F(DisplayConfigurationControllerTest, OnlyHasOneAnimator) {
// TODO(wutao): needs display_configuration_controller
// http://crbug.com/686839.
if (Shell::GetAshConfig() == Config::MASH)
@@ -33,7 +33,14 @@ TEST_F(DisplayConfigurationControllerTest, ErasesAnimatorOnAnimationEnded) {
screen_rotation_animator->Rotate(
display::Display::ROTATE_90,
display::Display::RotationSource::ROTATION_SOURCE_USER);
- EXPECT_EQ(0, testapi.DisplayScreenRotationAnimatorMapSize());
+ EXPECT_EQ(1, testapi.DisplayScreenRotationAnimatorMapSize());
+
+ screen_rotation_animator =
+ testapi.GetScreenRotationAnimatorForDisplay(display.id());
+ screen_rotation_animator->Rotate(
+ display::Display::ROTATE_180,
+ display::Display::RotationSource::ROTATION_SOURCE_USER);
+ EXPECT_EQ(1, testapi.DisplayScreenRotationAnimatorMapSize());
}
} // namespace ash
« no previous file with comments | « ash/display/display_configuration_controller.cc ('k') | ash/display/root_window_transformers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698