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

Side by Side Diff: ui/aura/window_unittest.cc

Issue 613373004: Adopt ui::GestureConfiguration on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyright Created 6 years, 1 month 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
« no previous file with comments | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/events/BUILD.gn » ('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/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 #include "ui/aura/window_property.h" 29 #include "ui/aura/window_property.h"
30 #include "ui/aura/window_tree_host.h" 30 #include "ui/aura/window_tree_host.h"
31 #include "ui/base/hit_test.h" 31 #include "ui/base/hit_test.h"
32 #include "ui/compositor/layer.h" 32 #include "ui/compositor/layer.h"
33 #include "ui/compositor/layer_animation_observer.h" 33 #include "ui/compositor/layer_animation_observer.h"
34 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 34 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
35 #include "ui/compositor/scoped_layer_animation_settings.h" 35 #include "ui/compositor/scoped_layer_animation_settings.h"
36 #include "ui/compositor/test/test_layers.h" 36 #include "ui/compositor/test/test_layers.h"
37 #include "ui/events/event.h" 37 #include "ui/events/event.h"
38 #include "ui/events/event_utils.h" 38 #include "ui/events/event_utils.h"
39 #include "ui/events/gestures/gesture_configuration.h" 39 #include "ui/events/gesture_detection/gesture_configuration.h"
40 #include "ui/events/keycodes/keyboard_codes.h" 40 #include "ui/events/keycodes/keyboard_codes.h"
41 #include "ui/events/test/event_generator.h" 41 #include "ui/events/test/event_generator.h"
42 #include "ui/gfx/canvas.h" 42 #include "ui/gfx/canvas.h"
43 #include "ui/gfx/screen.h" 43 #include "ui/gfx/screen.h"
44 #include "ui/gfx/skia_util.h" 44 #include "ui/gfx/skia_util.h"
45 #include "ui/gfx/vector2d.h" 45 #include "ui/gfx/vector2d.h"
46 46
47 DECLARE_WINDOW_PROPERTY_TYPE(const char*) 47 DECLARE_WINDOW_PROPERTY_TYPE(const char*)
48 DECLARE_WINDOW_PROPERTY_TYPE(int) 48 DECLARE_WINDOW_PROPERTY_TYPE(int)
49 49
50 namespace aura { 50 namespace aura {
51 namespace test { 51 namespace test {
52 52
53 class WindowTest : public AuraTestBase { 53 class WindowTest : public AuraTestBase {
54 public: 54 public:
55 WindowTest() : max_separation_(0) { 55 WindowTest() : max_separation_(0) {
56 } 56 }
57 57
58 virtual void SetUp() override { 58 virtual void SetUp() override {
59 AuraTestBase::SetUp(); 59 AuraTestBase::SetUp();
60 // TODO: there needs to be an easier way to do this. 60 // TODO: there needs to be an easier way to do this.
61 max_separation_ = ui::GestureConfiguration:: 61 max_separation_ = ui::GestureConfiguration::GetInstance()
62 max_separation_for_gesture_touches_in_pixels(); 62 ->max_separation_for_gesture_touches_in_pixels();
63 ui::GestureConfiguration:: 63 ui::GestureConfiguration::GetInstance()
64 set_max_separation_for_gesture_touches_in_pixels(0); 64 ->set_max_separation_for_gesture_touches_in_pixels(0);
65 } 65 }
66 66
67 virtual void TearDown() override { 67 virtual void TearDown() override {
68 AuraTestBase::TearDown(); 68 AuraTestBase::TearDown();
69 ui::GestureConfiguration:: 69 ui::GestureConfiguration::GetInstance()
70 set_max_separation_for_gesture_touches_in_pixels(max_separation_); 70 ->set_max_separation_for_gesture_touches_in_pixels(max_separation_);
71 } 71 }
72 72
73 private: 73 private:
74 float max_separation_; 74 float max_separation_;
75 75
76 DISALLOW_COPY_AND_ASSIGN(WindowTest); 76 DISALLOW_COPY_AND_ASSIGN(WindowTest);
77 }; 77 };
78 78
79 namespace { 79 namespace {
80 80
(...skipping 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after
3490 3490
3491 EXPECT_TRUE(animator.get()); 3491 EXPECT_TRUE(animator.get());
3492 EXPECT_FALSE(animator->is_animating()); 3492 EXPECT_FALSE(animator->is_animating());
3493 EXPECT_TRUE(observer.animation_completed()); 3493 EXPECT_TRUE(observer.animation_completed());
3494 EXPECT_FALSE(observer.animation_aborted()); 3494 EXPECT_FALSE(observer.animation_aborted());
3495 animator->RemoveObserver(&observer); 3495 animator->RemoveObserver(&observer);
3496 } 3496 }
3497 3497
3498 } // namespace test 3498 } // namespace test
3499 } // namespace aura 3499 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/events/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698