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

Unified Diff: ash/rotator/screen_rotation_animator_unittest.cc

Issue 2837773003: Flip the flag to enable smooth screen rotation by default. (Closed)
Patch Set: Add comments how the test will work. 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/rotator/screen_rotation_animator.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animator_unittest.cc
diff --git a/ash/rotator/screen_rotation_animator_unittest.cc b/ash/rotator/screen_rotation_animator_unittest.cc
index 19de9cebb14f7c317448a2714d58e5395fa80edf..fa65898242594e67f52b59f6cf3f61ae3dfd0dc4 100644
--- a/ash/rotator/screen_rotation_animator_unittest.cc
+++ b/ash/rotator/screen_rotation_animator_unittest.cc
@@ -12,6 +12,7 @@
#include "ash/shell.h"
#include "ash/shell_port.h"
#include "ash/test/ash_test_base.h"
+#include "ash/test/ash_test_helper.h"
#include "base/callback_forward.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
@@ -222,6 +223,10 @@ void ScreenRotationAnimatorSmoothAnimationTest::QuitWaitForCopyCallback() {
void ScreenRotationAnimatorSmoothAnimationTest::SetUp() {
AshTestBase::SetUp();
+ // Resets the commandline will clear all the switches, including
+ // "ash-disable-smooth-screen-rotation", so that we can test the smooth screen
+ // rotation animation. The |animator| is recreated and checking this swtich.
+ ash_test_helper()->reset_commandline();
display_ = display::Screen::GetScreen()->GetPrimaryDisplay();
if (Shell::GetAshConfig() == Config::MASH) {
@@ -230,8 +235,6 @@ void ScreenRotationAnimatorSmoothAnimationTest::SetUp() {
return;
}
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshEnableSmoothScreenRotation);
run_loop_ = base::MakeUnique<base::RunLoop>();
SetScreenRotationAnimator(display_.id(), run_loop_->QuitWhenIdleClosure(),
run_loop_->QuitWhenIdleClosure());
« no previous file with comments | « ash/rotator/screen_rotation_animator.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698