| 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 virtual void SetUp() OVERRIDE { | 682 virtual void SetUp() OVERRIDE { |
| 683 // TODO(tdresser): Once unified GR has landed, only run these tests once. | 683 // TODO(tdresser): Once unified GR has landed, only run these tests once. |
| 684 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 684 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 685 switches::kUnifiedGestureDetector, | 685 switches::kUnifiedGestureDetector, |
| 686 UsingUnifiedGR() ? switches::kUnifiedGestureDetectorEnabled | 686 UsingUnifiedGR() ? switches::kUnifiedGestureDetectorEnabled |
| 687 : switches::kUnifiedGestureDetectorDisabled); | 687 : switches::kUnifiedGestureDetectorDisabled); |
| 688 | 688 |
| 689 AuraTestBase::SetUp(); | 689 AuraTestBase::SetUp(); |
| 690 } | 690 } |
| 691 | 691 |
| 692 virtual void TearDown() OVERRIDE { | |
| 693 AuraTestBase::TearDown(); | |
| 694 RunAllPendingInMessageLoop(); | |
| 695 } | |
| 696 | |
| 697 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerTest); | 692 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerTest); |
| 698 }; | 693 }; |
| 699 | 694 |
| 700 // Check that appropriate touch events generate tap gesture events. | 695 // Check that appropriate touch events generate tap gesture events. |
| 701 TEST_P(GestureRecognizerTest, GestureEventTap) { | 696 TEST_P(GestureRecognizerTest, GestureEventTap) { |
| 702 scoped_ptr<GestureEventConsumeDelegate> delegate( | 697 scoped_ptr<GestureEventConsumeDelegate> delegate( |
| 703 new GestureEventConsumeDelegate()); | 698 new GestureEventConsumeDelegate()); |
| 704 TimedEvents tes; | 699 TimedEvents tes; |
| 705 const int kWindowWidth = 123; | 700 const int kWindowWidth = 123; |
| 706 const int kWindowHeight = 45; | 701 const int kWindowHeight = 45; |
| (...skipping 3567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4274 DispatchEventUsingWindowDispatcher(&move1); | 4269 DispatchEventUsingWindowDispatcher(&move1); |
| 4275 EXPECT_NE(default_flags, delegate->flags()); | 4270 EXPECT_NE(default_flags, delegate->flags()); |
| 4276 } | 4271 } |
| 4277 | 4272 |
| 4278 INSTANTIATE_TEST_CASE_P(GestureRecognizer, | 4273 INSTANTIATE_TEST_CASE_P(GestureRecognizer, |
| 4279 GestureRecognizerTest, | 4274 GestureRecognizerTest, |
| 4280 ::testing::Bool()); | 4275 ::testing::Bool()); |
| 4281 | 4276 |
| 4282 } // namespace test | 4277 } // namespace test |
| 4283 } // namespace aura | 4278 } // namespace aura |
| OLD | NEW |