OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <new> | 7 #include <new> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 disabled_features.push_back(features::kRafAlignedMouseInputEvents.name); | 111 disabled_features.push_back(features::kRafAlignedMouseInputEvents.name); |
112 } | 112 } |
113 | 113 |
114 feature_list_.InitFromCommandLine(base::JoinString(features, ","), | 114 feature_list_.InitFromCommandLine(base::JoinString(features, ","), |
115 base::JoinString(disabled_features, ",")); | 115 base::JoinString(disabled_features, ",")); |
116 } | 116 } |
117 | 117 |
118 void SetUp() override { | 118 void SetUp() override { |
119 queue_ = new MainThreadEventQueue(this, main_task_runner_, | 119 queue_ = new MainThreadEventQueue(this, main_task_runner_, |
120 &renderer_scheduler_, true); | 120 &renderer_scheduler_, true); |
| 121 queue_->set_use_raf_fallback_timer(false); |
121 } | 122 } |
122 | 123 |
123 bool HandleEvent(WebInputEvent& event, InputEventAckState ack_result) { | 124 bool HandleEvent(WebInputEvent& event, InputEventAckState ack_result) { |
124 return queue_->HandleEvent(ui::WebInputEventTraits::Clone(event), | 125 return queue_->HandleEvent(ui::WebInputEventTraits::Clone(event), |
125 ui::LatencyInfo(), DISPATCH_TYPE_BLOCKING, | 126 ui::LatencyInfo(), DISPATCH_TYPE_BLOCKING, |
126 ack_result); | 127 ack_result); |
127 } | 128 } |
128 | 129 |
129 void RunClosure(unsigned closure_id) { | 130 void RunClosure(unsigned closure_id) { |
130 std::unique_ptr<HandledTask> closure(new HandledClosure(closure_id)); | 131 std::unique_ptr<HandledTask> closure(new HandledClosure(closure_id)); |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 static_cast<const WebTouchEvent&>( | 1087 static_cast<const WebTouchEvent&>( |
1087 handled_tasks_.at(0)->taskAsEvent()->Event()) | 1088 handled_tasks_.at(0)->taskAsEvent()->Event()) |
1088 .dispatch_type); | 1089 .dispatch_type); |
1089 EXPECT_EQ(WebInputEvent::kBlocking, | 1090 EXPECT_EQ(WebInputEvent::kBlocking, |
1090 static_cast<const WebTouchEvent&>( | 1091 static_cast<const WebTouchEvent&>( |
1091 handled_tasks_.at(1)->taskAsEvent()->Event()) | 1092 handled_tasks_.at(1)->taskAsEvent()->Event()) |
1092 .dispatch_type); | 1093 .dispatch_type); |
1093 } | 1094 } |
1094 | 1095 |
1095 } // namespace content | 1096 } // namespace content |
OLD | NEW |