| Index: ui/chromeos/touch_exploration_controller_unittest.cc
|
| diff --git a/ui/chromeos/touch_exploration_controller_unittest.cc b/ui/chromeos/touch_exploration_controller_unittest.cc
|
| index 86582f0ff06b5bc06698b094700dc7c677d3e52e..f013c8e1f7697673aa1635cbd8f6ee59fb130402 100644
|
| --- a/ui/chromeos/touch_exploration_controller_unittest.cc
|
| +++ b/ui/chromeos/touch_exploration_controller_unittest.cc
|
| @@ -782,6 +782,7 @@ TEST_F(TouchExplorationTest, SplitTap) {
|
| EXPECT_TRUE(events[0]->flags() & ui::EF_IS_SYNTHESIZED);
|
| EXPECT_TRUE(events[0]->flags() & ui::EF_TOUCH_ACCESSIBILITY);
|
| ClearCapturedEvents();
|
| + EXPECT_TRUE(IsInTouchToMouseMode());
|
|
|
| // Now tap and release at a different location. This should result in a
|
| // single touch and release at the location of the first (held) tap,
|
| @@ -790,10 +791,17 @@ TEST_F(TouchExplorationTest, SplitTap) {
|
| ui::TouchEvent split_tap_press(
|
| ui::ET_TOUCH_PRESSED, second_touch_location, 1, Now());
|
| generator_->Dispatch(&split_tap_press);
|
| + // To simulate the behavior of the real device, we manually disable
|
| + // mouse events. To not rely on manually setting the state, this is also
|
| + // tested in touch_exploration_controller_browsertest.
|
| + cursor_client()->DisableMouseEvents();
|
| ui::TouchEvent split_tap_release(
|
| ui::ET_TOUCH_RELEASED, second_touch_location, 1, Now());
|
| generator_->Dispatch(&split_tap_release);
|
| EXPECT_FALSE(IsInNoFingersDownState());
|
| + // Releasing the second finger should re-enable mouse events putting us
|
| + // back into the touch exploration mode.
|
| + EXPECT_TRUE(IsInTouchToMouseMode());
|
|
|
| const ScopedVector<ui::LocatedEvent>& captured_events = GetCapturedEvents();
|
| ASSERT_EQ(2U, captured_events.size());
|
| @@ -801,6 +809,13 @@ TEST_F(TouchExplorationTest, SplitTap) {
|
| EXPECT_EQ(initial_touch_location, captured_events[0]->location());
|
| EXPECT_EQ(ui::ET_TOUCH_RELEASED, captured_events[1]->type());
|
| EXPECT_EQ(initial_touch_location, captured_events[1]->location());
|
| + ClearCapturedEvents();
|
| +
|
| + ui::TouchEvent touch_explore_release(
|
| + ui::ET_TOUCH_RELEASED, initial_touch_location, 0, Now());
|
| + generator_->Dispatch(&touch_explore_release);
|
| + AdvanceSimulatedTimePastTapDelay();
|
| + EXPECT_TRUE(IsInNoFingersDownState());
|
| }
|
|
|
| // If split tap is started but the touch explore finger is released first,
|
| @@ -874,6 +889,9 @@ TEST_F(TouchExplorationTest, SplitTapLongPress) {
|
| ui::ET_TOUCH_RELEASED, second_touch_location, 1, Now());
|
| generator_->Dispatch(&split_tap_release);
|
| EXPECT_FALSE(IsInNoFingersDownState());
|
| + // This is the added line in the test. TODO: Change the way the cursor
|
| + // client is set up so this test will fail.
|
| + EXPECT_TRUE(IsInTouchToMouseMode());
|
|
|
| const ScopedVector<ui::LocatedEvent>& captured_events = GetCapturedEvents();
|
| ASSERT_EQ(2U, captured_events.size());
|
|
|