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

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

Issue 11299276: Bound the maximum touchscreen fling velocity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review nits Created 8 years 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | ui/base/gestures/gesture_configuration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/aura_test_helper.h" 7 #include "ui/aura/test/aura_test_helper.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/base/gestures/gesture_configuration.h" 9 #include "ui/base/gestures/gesture_configuration.h"
10 #include "ui/base/ime/text_input_test_support.h" 10 #include "ui/base/ime/text_input_test_support.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ui::GestureConfiguration::set_rail_start_proportion(2); 47 ui::GestureConfiguration::set_rail_start_proportion(2);
48 ui::GestureConfiguration::set_default_radius(0); 48 ui::GestureConfiguration::set_default_radius(0);
49 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients( 49 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients(
50 0, 0.0166667f); 50 0, 0.0166667f);
51 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients( 51 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients(
52 1, -0.0238095f); 52 1, -0.0238095f);
53 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients( 53 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients(
54 2, 0.0452381f); 54 2, 0.0452381f);
55 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients( 55 ui::GestureConfiguration::set_fling_acceleration_curve_coefficients(
56 3, 0.8f); 56 3, 0.8f);
57 ui::GestureConfiguration::set_fling_velocity_cap(15000.0f);
57 58
58 helper_.reset(new AuraTestHelper(&message_loop_)); 59 helper_.reset(new AuraTestHelper(&message_loop_));
59 helper_->SetUp(); 60 helper_->SetUp();
60 } 61 }
61 62
62 void AuraTestBase::TearDown() { 63 void AuraTestBase::TearDown() {
63 // Flush the message loop because we have pending release tasks 64 // Flush the message loop because we have pending release tasks
64 // and these tasks if un-executed would upset Valgrind. 65 // and these tasks if un-executed would upset Valgrind.
65 RunAllPendingInMessageLoop(); 66 RunAllPendingInMessageLoop();
66 67
(...skipping 15 matching lines...) Expand all
82 void AuraTestBase::SetDefaultParentByPrimaryRootWindow(aura::Window* window) { 83 void AuraTestBase::SetDefaultParentByPrimaryRootWindow(aura::Window* window) {
83 window->SetDefaultParentByRootWindow(root_window(), gfx::Rect()); 84 window->SetDefaultParentByRootWindow(root_window(), gfx::Rect());
84 } 85 }
85 86
86 void AuraTestBase::RunAllPendingInMessageLoop() { 87 void AuraTestBase::RunAllPendingInMessageLoop() {
87 helper_->RunAllPendingInMessageLoop(); 88 helper_->RunAllPendingInMessageLoop();
88 } 89 }
89 90
90 } // namespace test 91 } // namespace test
91 } // namespace aura 92 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | ui/base/gestures/gesture_configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698