OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/scoped_vector.h" | 6 #include "base/memory/scoped_vector.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 // Make sure there is enough delay before the touch is released so that it is | 2655 // Make sure there is enough delay before the touch is released so that it is |
2656 // recognized as a tap. | 2656 // recognized as a tap. |
2657 delegate->Reset(); | 2657 delegate->Reset(); |
2658 ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), | 2658 ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
2659 kTouchId1, tes.LeapForward(50)); | 2659 kTouchId1, tes.LeapForward(50)); |
2660 | 2660 |
2661 DispatchEventUsingWindowDispatcher(&release1); | 2661 DispatchEventUsingWindowDispatcher(&release1); |
2662 EXPECT_FALSE(delegate->tap()); | 2662 EXPECT_FALSE(delegate->tap()); |
2663 EXPECT_FALSE(delegate->tap_down()); | 2663 EXPECT_FALSE(delegate->tap_down()); |
2664 EXPECT_FALSE(delegate->tap_cancel()); | 2664 EXPECT_FALSE(delegate->tap_cancel()); |
2665 EXPECT_FALSE(delegate->scroll_begin()); | 2665 EXPECT_TRUE(delegate->scroll_begin()); |
2666 EXPECT_FALSE(delegate->scroll_update()); | 2666 EXPECT_FALSE(delegate->scroll_update()); |
2667 EXPECT_FALSE(delegate->scroll_end()); | 2667 EXPECT_FALSE(delegate->scroll_end()); |
2668 EXPECT_TRUE(delegate->two_finger_tap()); | 2668 EXPECT_TRUE(delegate->two_finger_tap()); |
2669 | 2669 |
2670 // Lift second finger. | 2670 // Lift second finger. |
2671 // Make sure there is enough delay before the touch is released so that it is | 2671 // Make sure there is enough delay before the touch is released so that it is |
2672 // recognized as a tap. | 2672 // recognized as a tap. |
2673 delegate->Reset(); | 2673 delegate->Reset(); |
2674 ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201), | 2674 ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201), |
2675 kTouchId2, tes.LeapForward(50)); | 2675 kTouchId2, tes.LeapForward(50)); |
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4090 DispatchEventUsingWindowDispatcher(&move3); | 4090 DispatchEventUsingWindowDispatcher(&move3); |
4091 delegate->ReceivedAckPreventDefaulted(); | 4091 delegate->ReceivedAckPreventDefaulted(); |
4092 EXPECT_FALSE(delegate->scroll_begin()); | 4092 EXPECT_FALSE(delegate->scroll_begin()); |
4093 EXPECT_FALSE(delegate->scroll_update()); | 4093 EXPECT_FALSE(delegate->scroll_update()); |
4094 delegate->Reset(); | 4094 delegate->Reset(); |
4095 } | 4095 } |
4096 } | 4096 } |
4097 | 4097 |
4098 } // namespace test | 4098 } // namespace test |
4099 } // namespace aura | 4099 } // namespace aura |
OLD | NEW |