| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 private: | 663 private: |
| 664 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerTest); | 664 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerTest); |
| 665 }; | 665 }; |
| 666 | 666 |
| 667 class GestureRecognizerWithSwitchTest : public GestureRecognizerTest { | 667 class GestureRecognizerWithSwitchTest : public GestureRecognizerTest { |
| 668 public: | 668 public: |
| 669 GestureRecognizerWithSwitchTest() {} | 669 GestureRecognizerWithSwitchTest() {} |
| 670 | 670 |
| 671 void SetUp() override { | 671 void SetUp() override { |
| 672 GestureRecognizerTest::SetUp(); | 672 GestureRecognizerTest::SetUp(); |
| 673 CommandLine::ForCurrentProcess()->AppendSwitch( | 673 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 674 switches::kCompensateForUnstablePinchZoom); | 674 switches::kCompensateForUnstablePinchZoom); |
| 675 ui::GestureConfiguration::GetInstance()->set_min_pinch_update_span_delta(5); | 675 ui::GestureConfiguration::GetInstance()->set_min_pinch_update_span_delta(5); |
| 676 } | 676 } |
| 677 | 677 |
| 678 private: | 678 private: |
| 679 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerWithSwitchTest); | 679 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerWithSwitchTest); |
| 680 }; | 680 }; |
| 681 | 681 |
| 682 // Check that appropriate touch events generate tap gesture events. | 682 // Check that appropriate touch events generate tap gesture events. |
| 683 TEST_F(GestureRecognizerTest, GestureEventTap) { | 683 TEST_F(GestureRecognizerTest, GestureEventTap) { |
| (...skipping 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4427 // The synchronous ack is stuck behind the pending touch move. | 4427 // The synchronous ack is stuck behind the pending touch move. |
| 4428 EXPECT_0_EVENTS(delegate->events()); | 4428 EXPECT_0_EVENTS(delegate->events()); |
| 4429 | 4429 |
| 4430 delegate->ReceivedAck(); | 4430 delegate->ReceivedAck(); |
| 4431 EXPECT_2_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE, | 4431 EXPECT_2_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE, |
| 4432 ui::ET_GESTURE_SCROLL_UPDATE); | 4432 ui::ET_GESTURE_SCROLL_UPDATE); |
| 4433 } | 4433 } |
| 4434 | 4434 |
| 4435 } // namespace test | 4435 } // namespace test |
| 4436 } // namespace aura | 4436 } // namespace aura |
| OLD | NEW |