Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: ui/aura/test/aura_test_base.cc

Issue 289283015: Extract touchscreen device management into a generic manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "ui/aura/test/aura_test_base.h" 5 #include "ui/aura/test/aura_test_base.h"
6 6
7 #include "ui/aura/client/window_tree_client.h" 7 #include "ui/aura/client/window_tree_client.h"
8 #include "ui/aura/test/aura_test_helper.h" 8 #include "ui/aura/test/aura_test_helper.h"
9 #include "ui/aura/test/test_window_delegate.h" 9 #include "ui/aura/test/test_window_delegate.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 14 matching lines...) Expand all
25 AuraTestBase::~AuraTestBase() { 25 AuraTestBase::~AuraTestBase() {
26 CHECK(setup_called_) 26 CHECK(setup_called_)
27 << "You have overridden SetUp but never called super class's SetUp"; 27 << "You have overridden SetUp but never called super class's SetUp";
28 CHECK(teardown_called_) 28 CHECK(teardown_called_)
29 << "You have overridden TearDown but never called super class's TearDown"; 29 << "You have overridden TearDown but never called super class's TearDown";
30 } 30 }
31 31
32 void AuraTestBase::SetUp() { 32 void AuraTestBase::SetUp() {
33 setup_called_ = true; 33 setup_called_ = true;
34 testing::Test::SetUp(); 34 testing::Test::SetUp();
35 // Object registers itself with AtExitManager
sadrul 2014/06/16 14:48:38 ?
35 ui::InitializeInputMethodForTesting(); 36 ui::InitializeInputMethodForTesting();
36 37
37 // Changing the parameters for gesture recognition shouldn't cause 38 // Changing the parameters for gesture recognition shouldn't cause
38 // tests to fail, so we use a separate set of parameters for unit 39 // tests to fail, so we use a separate set of parameters for unit
39 // testing. 40 // testing.
40 ui::GestureConfiguration::set_long_press_time_in_seconds(1.0); 41 ui::GestureConfiguration::set_long_press_time_in_seconds(1.0);
41 ui::GestureConfiguration::set_semi_long_press_time_in_seconds(0.4); 42 ui::GestureConfiguration::set_semi_long_press_time_in_seconds(0.4);
42 ui::GestureConfiguration::set_show_press_delay_in_ms(5); 43 ui::GestureConfiguration::set_show_press_delay_in_ms(5);
43 ui::GestureConfiguration::set_max_distance_for_two_finger_tap_in_pixels(300); 44 ui::GestureConfiguration::set_max_distance_for_two_finger_tap_in_pixels(300);
44 ui::GestureConfiguration::set_max_seconds_between_double_click(0.7); 45 ui::GestureConfiguration::set_max_seconds_between_double_click(0.7);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 117
117 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) { 118 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) {
118 ui::EventDispatchDetails details = 119 ui::EventDispatchDetails details =
119 event_processor()->OnEventFromSource(event); 120 event_processor()->OnEventFromSource(event);
120 CHECK(!details.dispatcher_destroyed); 121 CHECK(!details.dispatcher_destroyed);
121 return event->handled(); 122 return event->handled();
122 } 123 }
123 124
124 } // namespace test 125 } // namespace test
125 } // namespace aura 126 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698