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

Unified Diff: ash/laser/laser_pointer_controller_unittest.cc

Issue 2362063002: cros: Laser pointer fades out on release, do not cover palette. (Closed)
Patch Set: Created 4 years, 3 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
Index: ash/laser/laser_pointer_controller_unittest.cc
diff --git a/ash/laser/laser_pointer_controller_unittest.cc b/ash/laser/laser_pointer_controller_unittest.cc
index 68878038784e20adfa183aee741a3d94ea5764d9..ea73da8dfefad031ebd385a17ab6c48a641aa799 100644
--- a/ash/laser/laser_pointer_controller_unittest.cc
+++ b/ash/laser/laser_pointer_controller_unittest.cc
@@ -159,9 +159,11 @@ TEST_F(LaserPointerControllerTest, LaserPointerRenderer) {
GetEventGenerator().MoveMouseToInHost(gfx::Point(5, 5));
EXPECT_FALSE(controller_test_api_.IsShowingLaserPointer());
- // Verify pressing the stylus will show the laser pointer and add a point.
+ // Verify pressing the stylus will show the laser pointer and add a point but
+ // will not activate fading out.
GetEventGenerator().PressLeftButton();
EXPECT_TRUE(controller_test_api_.IsShowingLaserPointer());
+ EXPECT_FALSE(controller_test_api_.IsFadingOut());
EXPECT_EQ(1, controller_test_api_.laser_points().GetNumberOfPoints());
// Verify dragging the stylus 2 times will add 2 more points.
@@ -169,9 +171,11 @@ TEST_F(LaserPointerControllerTest, LaserPointerRenderer) {
GetEventGenerator().MoveMouseToInHost(gfx::Point(7, 7));
EXPECT_EQ(3, controller_test_api_.laser_points().GetNumberOfPoints());
- // Verify releasing the stylus hides the laser pointer.
+ // Verify releasing the stylus still shows the laser pointer, which is fading
+ // away.
GetEventGenerator().ReleaseLeftButton();
- EXPECT_FALSE(controller_test_api_.IsShowingLaserPointer());
+ EXPECT_TRUE(controller_test_api_.IsShowingLaserPointer());
+ EXPECT_TRUE(controller_test_api_.IsFadingOut());
// Verify that disabling the mode does not display the laser pointer.
controller_test_api_.SetEnabled(false);

Powered by Google App Engine
This is Rietveld 408576698