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

Side by Side Diff: content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc

Issue 1861733002: Add touch drag UMA latency metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix everything. Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/test/histogram_tester.h" 5 #include "base/test/histogram_tester.h"
6 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h" 6 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h"
7 #include "content/common/input/synthetic_web_input_event_builders.h" 7 #include "content/common/input/synthetic_web_input_event_builders.h"
8 #include "content/public/browser/native_web_keyboard_event.h" 8 #include "content/public/browser/native_web_keyboard_event.h"
9 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 11
12 using base::Bucket;
11 using blink::WebInputEvent; 13 using blink::WebInputEvent;
14 using testing::ElementsAre;
12 15
13 namespace content { 16 namespace content {
14 namespace { 17 namespace {
15 18
16 void AddFakeComponents(const RenderWidgetHostLatencyTracker& tracker, 19 void AddFakeComponents(const RenderWidgetHostLatencyTracker& tracker,
17 ui::LatencyInfo* latency) { 20 ui::LatencyInfo* latency) {
18 latency->AddLatencyNumberWithTimestamp( 21 latency->AddLatencyNumberWithTimestamp(
19 ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0, base::TimeTicks::Now(), 1); 22 ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0, base::TimeTicks::Now(), 1);
20 latency->AddLatencyNumberWithTimestamp( 23 latency->AddLatencyNumberWithTimestamp(
21 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0, 24 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 << size << " entries, but had " 70 << size << " entries, but had "
68 << histogram_size; 71 << histogram_size;
69 } 72 }
70 } 73 }
71 74
72 RenderWidgetHostLatencyTracker* tracker() { return &tracker_; } 75 RenderWidgetHostLatencyTracker* tracker() { return &tracker_; }
73 void ResetHistograms() { 76 void ResetHistograms() {
74 histogram_tester_.reset(new base::HistogramTester()); 77 histogram_tester_.reset(new base::HistogramTester());
75 } 78 }
76 79
80 const base::HistogramTester& histogram_tester() {
81 return *histogram_tester_;
82 }
83
77 private: 84 private:
78 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTrackerTest); 85 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTrackerTest);
79 const int kTestRoutingId = 3; 86 const int kTestRoutingId = 3;
80 const int kTestProcessId = 1; 87 const int kTestProcessId = 1;
81 std::unique_ptr<base::HistogramTester> histogram_tester_; 88 std::unique_ptr<base::HistogramTester> histogram_tester_;
82 RenderWidgetHostLatencyTracker tracker_; 89 RenderWidgetHostLatencyTracker tracker_;
83 }; 90 };
84 91
85 TEST_F(RenderWidgetHostLatencyTrackerTest, TestHistograms) { 92 TEST_F(RenderWidgetHostLatencyTrackerTest, TestHistograms) {
86 for (bool rendering_on_main : { false, true }) { 93 for (bool rendering_on_main : { false, true }) {
87 ResetHistograms(); 94 ResetHistograms();
88 { 95 {
89 auto scroll = SyntheticWebGestureEventBuilder::BuildScrollUpdate( 96 auto scroll = SyntheticWebGestureEventBuilder::BuildScrollUpdate(
90 5.f, -5.f, 0, blink::WebGestureDeviceTouchscreen); 97 5.f, -5.f, 0, blink::WebGestureDeviceTouchscreen);
91 scroll.timeStampSeconds = 98 scroll.timeStampSeconds =
92 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); 99 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF();
93 ui::LatencyInfo scroll_latency; 100 ui::LatencyInfo scroll_latency;
94 AddFakeComponents(*tracker(), &scroll_latency); 101 AddFakeComponents(*tracker(), &scroll_latency);
95 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main); 102 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main);
96 tracker()->OnInputEvent(scroll, &scroll_latency); 103 tracker()->OnInputEvent(scroll, &scroll_latency);
97 EXPECT_TRUE(scroll_latency.FindLatency( 104 EXPECT_TRUE(scroll_latency.FindLatency(
98 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 105 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
99 tracker()->latency_component_id(), nullptr)); 106 tracker()->latency_component_id(), nullptr));
100 EXPECT_TRUE(scroll_latency.FindLatency( 107 EXPECT_TRUE(scroll_latency.FindLatency(
101 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); 108 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr));
102 EXPECT_EQ(1U, scroll_latency.input_coordinates_size()); 109 EXPECT_EQ(1U, scroll_latency.input_coordinates_size());
103 tracker()->OnInputEventAck(scroll, &scroll_latency); 110 tracker()->OnInputEventAck(scroll, &scroll_latency,
111 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
104 } 112 }
105 113
106 { 114 {
107 auto wheel = SyntheticWebMouseWheelEventBuilder::Build( 115 auto wheel = SyntheticWebMouseWheelEventBuilder::Build(
108 blink::WebMouseWheelEvent::PhaseChanged); 116 blink::WebMouseWheelEvent::PhaseChanged);
109 wheel.timeStampSeconds = 117 wheel.timeStampSeconds =
110 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); 118 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF();
111 ui::LatencyInfo wheel_latency; 119 ui::LatencyInfo wheel_latency;
112 AddFakeComponents(*tracker(), &wheel_latency); 120 AddFakeComponents(*tracker(), &wheel_latency);
113 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main); 121 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main);
114 tracker()->OnInputEvent(wheel, &wheel_latency); 122 tracker()->OnInputEvent(wheel, &wheel_latency);
115 EXPECT_TRUE(wheel_latency.FindLatency( 123 EXPECT_TRUE(wheel_latency.FindLatency(
116 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 124 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
117 tracker()->latency_component_id(), nullptr)); 125 tracker()->latency_component_id(), nullptr));
118 EXPECT_TRUE(wheel_latency.FindLatency( 126 EXPECT_TRUE(wheel_latency.FindLatency(
119 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); 127 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr));
120 EXPECT_EQ(1U, wheel_latency.input_coordinates_size()); 128 EXPECT_EQ(1U, wheel_latency.input_coordinates_size());
121 tracker()->OnInputEventAck(wheel, &wheel_latency); 129 tracker()->OnInputEventAck(wheel, &wheel_latency,
130 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
122 } 131 }
123 132
124 { 133 {
125 SyntheticWebTouchEvent touch; 134 SyntheticWebTouchEvent touch;
126 touch.PressPoint(0, 0); 135 touch.PressPoint(0, 0);
127 touch.PressPoint(1, 1); 136 touch.PressPoint(1, 1);
128 ui::LatencyInfo touch_latency; 137 ui::LatencyInfo touch_latency;
129 AddFakeComponents(*tracker(), &touch_latency); 138 AddFakeComponents(*tracker(), &touch_latency);
130 AddRenderingScheduledComponent(&touch_latency, rendering_on_main); 139 AddRenderingScheduledComponent(&touch_latency, rendering_on_main);
131 tracker()->OnInputEvent(touch, &touch_latency); 140 tracker()->OnInputEvent(touch, &touch_latency);
132 EXPECT_TRUE(touch_latency.FindLatency( 141 EXPECT_TRUE(touch_latency.FindLatency(
133 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 142 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
134 tracker()->latency_component_id(), nullptr)); 143 tracker()->latency_component_id(), nullptr));
135 EXPECT_TRUE(touch_latency.FindLatency( 144 EXPECT_TRUE(touch_latency.FindLatency(
136 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); 145 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr));
137 EXPECT_EQ(2U, touch_latency.input_coordinates_size()); 146 EXPECT_EQ(2U, touch_latency.input_coordinates_size());
138 tracker()->OnInputEventAck(touch, &touch_latency); 147 tracker()->OnInputEventAck(touch, &touch_latency,
148 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
139 tracker()->OnFrameSwapped(touch_latency); 149 tracker()->OnFrameSwapped(touch_latency);
140 } 150 }
141 151
142 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1)); 152 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1));
143 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchUI", 1)); 153 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchUI", 1));
144 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1)); 154 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1));
145 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchAcked", 1)); 155 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchAcked", 1));
146 EXPECT_TRUE( 156 EXPECT_TRUE(
147 HistogramSizeEq("Event.Latency.TouchToFirstScrollUpdateSwapBegin", 1)); 157 HistogramSizeEq("Event.Latency.TouchToFirstScrollUpdateSwapBegin", 1));
148 EXPECT_TRUE( 158 EXPECT_TRUE(
(...skipping 21 matching lines...) Expand all
170 TEST_F(RenderWidgetHostLatencyTrackerTest, 180 TEST_F(RenderWidgetHostLatencyTrackerTest,
171 LatencyTerminatedOnAckIfRenderingNotScheduled) { 181 LatencyTerminatedOnAckIfRenderingNotScheduled) {
172 { 182 {
173 auto scroll = SyntheticWebGestureEventBuilder::BuildScrollBegin( 183 auto scroll = SyntheticWebGestureEventBuilder::BuildScrollBegin(
174 5.f, -5.f, blink::WebGestureDeviceTouchscreen); 184 5.f, -5.f, blink::WebGestureDeviceTouchscreen);
175 ui::LatencyInfo scroll_latency; 185 ui::LatencyInfo scroll_latency;
176 AddFakeComponents(*tracker(), &scroll_latency); 186 AddFakeComponents(*tracker(), &scroll_latency);
177 // Don't include the rendering schedule component, since we're testing the 187 // Don't include the rendering schedule component, since we're testing the
178 // case where rendering isn't scheduled. 188 // case where rendering isn't scheduled.
179 tracker()->OnInputEvent(scroll, &scroll_latency); 189 tracker()->OnInputEvent(scroll, &scroll_latency);
180 tracker()->OnInputEventAck(scroll, &scroll_latency); 190 tracker()->OnInputEventAck(scroll, &scroll_latency,
191 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
181 EXPECT_TRUE(scroll_latency.FindLatency( 192 EXPECT_TRUE(scroll_latency.FindLatency(
182 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0, nullptr)); 193 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0, nullptr));
183 EXPECT_TRUE(scroll_latency.terminated()); 194 EXPECT_TRUE(scroll_latency.terminated());
184 } 195 }
185 196
186 { 197 {
187 auto wheel = SyntheticWebMouseWheelEventBuilder::Build( 198 auto wheel = SyntheticWebMouseWheelEventBuilder::Build(
188 blink::WebMouseWheelEvent::PhaseChanged); 199 blink::WebMouseWheelEvent::PhaseChanged);
189 ui::LatencyInfo wheel_latency; 200 ui::LatencyInfo wheel_latency;
190 AddFakeComponents(*tracker(), &wheel_latency); 201 AddFakeComponents(*tracker(), &wheel_latency);
191 tracker()->OnInputEvent(wheel, &wheel_latency); 202 tracker()->OnInputEvent(wheel, &wheel_latency);
192 tracker()->OnInputEventAck(wheel, &wheel_latency); 203 tracker()->OnInputEventAck(wheel, &wheel_latency,
204 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
193 EXPECT_TRUE(wheel_latency.FindLatency( 205 EXPECT_TRUE(wheel_latency.FindLatency(
194 ui::INPUT_EVENT_LATENCY_TERMINATED_MOUSE_WHEEL_COMPONENT, 0, nullptr)); 206 ui::INPUT_EVENT_LATENCY_TERMINATED_MOUSE_WHEEL_COMPONENT, 0, nullptr));
195 EXPECT_TRUE(wheel_latency.terminated()); 207 EXPECT_TRUE(wheel_latency.terminated());
196 } 208 }
197 209
198 { 210 {
199 SyntheticWebTouchEvent touch; 211 SyntheticWebTouchEvent touch;
200 touch.PressPoint(0, 0); 212 touch.PressPoint(0, 0);
201 ui::LatencyInfo touch_latency; 213 ui::LatencyInfo touch_latency;
202 AddFakeComponents(*tracker(), &touch_latency); 214 AddFakeComponents(*tracker(), &touch_latency);
203 tracker()->OnInputEvent(touch, &touch_latency); 215 tracker()->OnInputEvent(touch, &touch_latency);
204 tracker()->OnInputEventAck(touch, &touch_latency); 216 tracker()->OnInputEventAck(touch, &touch_latency,
217 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
205 EXPECT_TRUE(touch_latency.FindLatency( 218 EXPECT_TRUE(touch_latency.FindLatency(
206 ui::INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT, 0, nullptr)); 219 ui::INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT, 0, nullptr));
207 EXPECT_TRUE(touch_latency.terminated()); 220 EXPECT_TRUE(touch_latency.terminated());
208 tracker()->OnFrameSwapped(touch_latency); 221 tracker()->OnFrameSwapped(touch_latency);
209 } 222 }
210 223
211 { 224 {
212 auto mouse_move = SyntheticWebMouseEventBuilder::Build( 225 auto mouse_move = SyntheticWebMouseEventBuilder::Build(
213 blink::WebMouseEvent::MouseMove); 226 blink::WebMouseEvent::MouseMove);
214 ui::LatencyInfo mouse_latency; 227 ui::LatencyInfo mouse_latency;
215 AddFakeComponents(*tracker(), &mouse_latency); 228 AddFakeComponents(*tracker(), &mouse_latency);
216 tracker()->OnInputEvent(mouse_move, &mouse_latency); 229 tracker()->OnInputEvent(mouse_move, &mouse_latency);
217 tracker()->OnInputEventAck(mouse_move, &mouse_latency); 230 tracker()->OnInputEventAck(mouse_move, &mouse_latency,
231 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
218 EXPECT_TRUE(mouse_latency.FindLatency( 232 EXPECT_TRUE(mouse_latency.FindLatency(
219 ui::INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 0, nullptr)); 233 ui::INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 0, nullptr));
220 EXPECT_TRUE(mouse_latency.terminated()); 234 EXPECT_TRUE(mouse_latency.terminated());
221 } 235 }
222 236
223 { 237 {
224 auto key_event = SyntheticWebKeyboardEventBuilder::Build( 238 auto key_event = SyntheticWebKeyboardEventBuilder::Build(
225 blink::WebKeyboardEvent::Char); 239 blink::WebKeyboardEvent::Char);
226 ui::LatencyInfo key_latency; 240 ui::LatencyInfo key_latency;
227 AddFakeComponents(*tracker(), &key_latency); 241 AddFakeComponents(*tracker(), &key_latency);
228 tracker()->OnInputEvent(key_event, &key_latency); 242 tracker()->OnInputEvent(key_event, &key_latency);
229 tracker()->OnInputEventAck(key_event, &key_latency); 243 tracker()->OnInputEventAck(key_event, &key_latency,
244 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
230 EXPECT_TRUE(key_latency.FindLatency( 245 EXPECT_TRUE(key_latency.FindLatency(
231 ui::INPUT_EVENT_LATENCY_TERMINATED_KEYBOARD_COMPONENT, 0, nullptr)); 246 ui::INPUT_EVENT_LATENCY_TERMINATED_KEYBOARD_COMPONENT, 0, nullptr));
232 EXPECT_TRUE(key_latency.terminated()); 247 EXPECT_TRUE(key_latency.terminated());
233 } 248 }
234 249
235 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1)); 250 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1));
236 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchUI", 1)); 251 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchUI", 1));
237 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1)); 252 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1));
238 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchAcked", 1)); 253 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchAcked", 1));
239 EXPECT_TRUE( 254 EXPECT_TRUE(
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 tracker()->latency_component_id(), nullptr)); 372 tracker()->latency_component_id(), nullptr));
358 EXPECT_FALSE(scroll_latency.FindLatency( 373 EXPECT_FALSE(scroll_latency.FindLatency(
359 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, 374 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT,
360 tracker()->latency_component_id(), nullptr)); 375 tracker()->latency_component_id(), nullptr));
361 EXPECT_TRUE(scroll_latency.FindLatency( 376 EXPECT_TRUE(scroll_latency.FindLatency(
362 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, 377 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
363 tracker()->latency_component_id(), nullptr)); 378 tracker()->latency_component_id(), nullptr));
364 EXPECT_EQ(3U, scroll_latency.latency_components().size()); 379 EXPECT_EQ(3U, scroll_latency.latency_components().size());
365 } 380 }
366 381
382 TEST_F(RenderWidgetHostLatencyTrackerTest, TouchBlockingAndQueueingTime) {
383 for (InputEventAckState blocking :
384 {INPUT_EVENT_ACK_STATE_NOT_CONSUMED, INPUT_EVENT_ACK_STATE_CONSUMED}) {
385 SyntheticWebTouchEvent event;
386 event.PressPoint(1, 1);
387
388 ui::LatencyInfo latency_start;
389 tracker()->OnInputEvent(event, &latency_start);
390 tracker()->OnInputEventAck(event, &latency_start,
391 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
392
393 ui::LatencyInfo latency_move;
394 event.MovePoint(0, 20, 20);
395 tracker()->OnInputEvent(event, &latency_move);
396
397 EXPECT_TRUE(latency_move.FindLatency(
398 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr));
399 EXPECT_TRUE(
400 latency_move.FindLatency(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
401 tracker()->latency_component_id(), nullptr));
402
403 EXPECT_EQ(2U, latency_move.latency_components().size());
404
405 ui::LatencyInfo fake_latency_move;
406 fake_latency_move.AddLatencyNumberWithTimestamp(
407 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
408 tracker()->latency_component_id(), 0,
409 base::TimeTicks() + base::TimeDelta::FromMilliseconds(1), 1);
410
411 fake_latency_move.AddLatencyNumberWithTimestamp(
412 ui::INPUT_EVENT_LATENCY_RENDERER_MAIN_COMPONENT, 0, 0,
413 base::TimeTicks() + base::TimeDelta::FromMilliseconds(5), 1);
414
415 fake_latency_move.AddLatencyNumberWithTimestamp(
416 ui::INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT, 0, 0,
417 base::TimeTicks() + base::TimeDelta::FromMilliseconds(12), 1);
418
419 // Call ComputeInputLatencyHistograms directly to avoid OnInputEventAck
420 // overwriting components.
421 tracker()->ComputeInputLatencyHistograms(event.type,
422 tracker()->latency_component_id(),
423 fake_latency_move, blocking);
424 }
425
426 EXPECT_THAT(histogram_tester().GetAllSamples(
427 "Event.Latency.QueueingTime.TouchMoveDefaultPrevented"),
428 ElementsAre(Bucket(4, 1)));
429 EXPECT_THAT(histogram_tester().GetAllSamples(
430 "Event.Latency.QueueingTime.TouchMoveDefaultAllowed"),
431 ElementsAre(Bucket(4, 1)));
432 EXPECT_THAT(histogram_tester().GetAllSamples(
433 "Event.Latency.BlockingTime.TouchMoveDefaultPrevented"),
434 ElementsAre(Bucket(7, 1)));
435 EXPECT_THAT(histogram_tester().GetAllSamples(
436 "Event.Latency.BlockingTime.TouchMoveDefaultAllowed"),
437 ElementsAre(Bucket(7, 1)));
438 }
439
367 } // namespace content 440 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698