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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 histogram_tester.ExpectUniqueSample(kCoalescedCountHistogram, 1, 2); 181 histogram_tester.ExpectUniqueSample(kCoalescedCountHistogram, 1, 2);
182 } 182 }
183 183
184 TEST_P(MainThreadEventQueueTest, NonBlockingTouch) { 184 TEST_P(MainThreadEventQueueTest, NonBlockingTouch) {
185 base::HistogramTester histogram_tester; 185 base::HistogramTester histogram_tester;
186 186
187 SyntheticWebTouchEvent kEvents[4]; 187 SyntheticWebTouchEvent kEvents[4];
188 kEvents[0].PressPoint(10, 10); 188 kEvents[0].PressPoint(10, 10);
189 kEvents[1].PressPoint(10, 10); 189 kEvents[1].PressPoint(10, 10);
190 kEvents[1].modifiers = 1; 190 kEvents[1].setModifiers(1);
191 kEvents[1].MovePoint(0, 20, 20); 191 kEvents[1].MovePoint(0, 20, 20);
192 kEvents[2].PressPoint(10, 10); 192 kEvents[2].PressPoint(10, 10);
193 kEvents[2].MovePoint(0, 30, 30); 193 kEvents[2].MovePoint(0, 30, 30);
194 kEvents[3].PressPoint(10, 10); 194 kEvents[3].PressPoint(10, 10);
195 kEvents[3].MovePoint(0, 35, 35); 195 kEvents[3].MovePoint(0, 35, 35);
196 196
197 for (SyntheticWebTouchEvent& event : kEvents) 197 for (SyntheticWebTouchEvent& event : kEvents)
198 HandleEvent(event, INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING); 198 HandleEvent(event, INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING);
199 199
200 EXPECT_EQ(3u, event_queue().size()); 200 EXPECT_EQ(3u, event_queue().size());
(...skipping 419 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