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

Side by Side Diff: content/renderer/input/main_thread_event_queue_unittest.cc

Issue 2576013002: Introducing WebCoalescedInputEvent and inclusion in content/common (Closed)
Patch Set: Fix a few DCHECK hits Created 3 years, 11 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
OLDNEW
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 needs_main_frame_ = false; 118 needs_main_frame_ = false;
119 queue_->DispatchRafAlignedInput(); 119 queue_->DispatchRafAlignedInput();
120 } 120 }
121 } 121 }
122 122
123 protected: 123 protected:
124 base::test::ScopedFeatureList feature_list_; 124 base::test::ScopedFeatureList feature_list_;
125 scoped_refptr<base::TestSimpleTaskRunner> main_task_runner_; 125 scoped_refptr<base::TestSimpleTaskRunner> main_task_runner_;
126 blink::scheduler::MockRendererScheduler renderer_scheduler_; 126 blink::scheduler::MockRendererScheduler renderer_scheduler_;
127 scoped_refptr<MainThreadEventQueue> queue_; 127 scoped_refptr<MainThreadEventQueue> queue_;
128 std::vector<ui::ScopedWebInputEvent> handled_events_; 128 std::vector<blink::WebScopedInputEvent> handled_events_;
129 std::vector<uint32_t> additional_acked_events_; 129 std::vector<uint32_t> additional_acked_events_;
130 int raf_aligned_input_setting_; 130 int raf_aligned_input_setting_;
131 bool needs_main_frame_; 131 bool needs_main_frame_;
132 }; 132 };
133 133
134 TEST_P(MainThreadEventQueueTest, NonBlockingWheel) { 134 TEST_P(MainThreadEventQueueTest, NonBlockingWheel) {
135 base::HistogramTester histogram_tester; 135 base::HistogramTester histogram_tester;
136 136
137 WebMouseWheelEvent kEvents[4] = { 137 WebMouseWheelEvent kEvents[4] = {
138 SyntheticWebMouseWheelEventBuilder::Build(10, 10, 0, 53, 0, false), 138 SyntheticWebMouseWheelEventBuilder::Build(10, 10, 0, 53, 0, false),
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 // The boolean parameterized test varies whether rAF aligned input 621 // The boolean parameterized test varies whether rAF aligned input
622 // is enabled or not. 622 // is enabled or not.
623 INSTANTIATE_TEST_CASE_P( 623 INSTANTIATE_TEST_CASE_P(
624 MainThreadEventQueueTests, 624 MainThreadEventQueueTests,
625 MainThreadEventQueueTest, 625 MainThreadEventQueueTest,
626 testing::Range(0u, 626 testing::Range(0u,
627 (kRafAlignedEnabledTouch | kRafAlignedEnabledMouse) + 1)); 627 (kRafAlignedEnabledTouch | kRafAlignedEnabledMouse) + 1));
628 628
629 } // namespace content 629 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698