| 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, | 648 ui::PointerDetails details(ui::EventPointerType::POINTER_TYPE_TOUCH, radius_x, |
| 649 radius_x, | 649 radius_y, event->pointer_details().force, |
| 650 radius_y, | |
| 651 event->pointer_details().force, | |
| 652 event->pointer_details().tilt_x, | 650 event->pointer_details().tilt_x, |
| 653 event->pointer_details().tilt_y); | 651 event->pointer_details().tilt_y, |
| 652 event->pointer_details().tangential_pressure, |
| 653 event->pointer_details().twist); |
| 654 event->set_pointer_details(details); | 654 event->set_pointer_details(details); |
| 655 } | 655 } |
| 656 | 656 |
| 657 } // namespace | 657 } // namespace |
| 658 | 658 |
| 659 class GestureRecognizerTest : public AuraTestBase, | 659 class GestureRecognizerTest : public AuraTestBase, |
| 660 public ::testing::WithParamInterface<bool> { | 660 public ::testing::WithParamInterface<bool> { |
| 661 public: | 661 public: |
| 662 GestureRecognizerTest() {} | 662 GestureRecognizerTest() {} |
| 663 | 663 |
| (...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4469 EXPECT_FALSE(queued_delegate2->long_press()); | 4469 EXPECT_FALSE(queued_delegate2->long_press()); |
| 4470 | 4470 |
| 4471 queued_delegate->Reset(); | 4471 queued_delegate->Reset(); |
| 4472 queued_delegate->WaitUntilReceivedGesture(ui::ET_GESTURE_SHOW_PRESS); | 4472 queued_delegate->WaitUntilReceivedGesture(ui::ET_GESTURE_SHOW_PRESS); |
| 4473 EXPECT_TRUE(queued_delegate->show_press()); | 4473 EXPECT_TRUE(queued_delegate->show_press()); |
| 4474 EXPECT_FALSE(queued_delegate->tap_down()); | 4474 EXPECT_FALSE(queued_delegate->tap_down()); |
| 4475 } | 4475 } |
| 4476 | 4476 |
| 4477 } // namespace test | 4477 } // namespace test |
| 4478 } // namespace aura | 4478 } // namespace aura |
| OLD | NEW |