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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 base::RunLoop run_loop; | 638 base::RunLoop run_loop; |
639 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 639 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
640 FROM_HERE, run_loop.QuitClosure(), | 640 FROM_HERE, run_loop.QuitClosure(), |
641 config.gesture_detector_config.showpress_timeout * 2); | 641 config.gesture_detector_config.showpress_timeout * 2); |
642 run_loop.Run(); | 642 run_loop.Run(); |
643 } | 643 } |
644 | 644 |
645 void SetTouchRadius(ui::TouchEvent* event, float radius_x, float radius_y) { | 645 void SetTouchRadius(ui::TouchEvent* event, float radius_x, float radius_y) { |
646 // Using ctor (over direct struct access) due to it's special behavior with | 646 // Using ctor (over direct struct access) due to it's special behavior with |
647 // radii. | 647 // radii. |
648 ui::PointerDetails details(ui::EventPointerType::POINTER_TYPE_TOUCH, radius_x, | 648 ui::PointerDetails details(ui::EventPointerType::POINTER_TYPE_TOUCH, |
649 radius_y, event->pointer_details().force, | 649 radius_x, |
| 650 radius_y, |
| 651 event->pointer_details().force, |
650 event->pointer_details().tilt_x, | 652 event->pointer_details().tilt_x, |
651 event->pointer_details().tilt_y, | 653 event->pointer_details().tilt_y, |
652 event->pointer_details().tangential_pressure, | 654 event->pointer_details().tangential_pressure, |
653 event->pointer_details().twist); | 655 event->pointer_details().twist, |
| 656 event->pointer_details().id); |
654 event->set_pointer_details(details); | 657 event->set_pointer_details(details); |
655 } | 658 } |
656 | 659 |
657 } // namespace | 660 } // namespace |
658 | 661 |
659 class GestureRecognizerTest : public AuraTestBase, | 662 class GestureRecognizerTest : public AuraTestBase, |
660 public ::testing::WithParamInterface<bool> { | 663 public ::testing::WithParamInterface<bool> { |
661 public: | 664 public: |
662 GestureRecognizerTest() {} | 665 GestureRecognizerTest() {} |
663 | 666 |
(...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4469 EXPECT_FALSE(queued_delegate2->long_press()); | 4472 EXPECT_FALSE(queued_delegate2->long_press()); |
4470 | 4473 |
4471 queued_delegate->Reset(); | 4474 queued_delegate->Reset(); |
4472 queued_delegate->WaitUntilReceivedGesture(ui::ET_GESTURE_SHOW_PRESS); | 4475 queued_delegate->WaitUntilReceivedGesture(ui::ET_GESTURE_SHOW_PRESS); |
4473 EXPECT_TRUE(queued_delegate->show_press()); | 4476 EXPECT_TRUE(queued_delegate->show_press()); |
4474 EXPECT_FALSE(queued_delegate->tap_down()); | 4477 EXPECT_FALSE(queued_delegate->tap_down()); |
4475 } | 4478 } |
4476 | 4479 |
4477 } // namespace test | 4480 } // namespace test |
4478 } // namespace aura | 4481 } // namespace aura |
OLD | NEW |