OLD | NEW |
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 "components/rappor/public/rappor_utils.h" | 6 #include "components/rappor/public/rappor_utils.h" |
7 #include "components/rappor/test_rappor_service.h" | 7 #include "components/rappor/test_rappor_service.h" |
8 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker
.h" | 8 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker
.h" |
9 #include "content/common/input/synthetic_web_input_event_builders.h" | 9 #include "content/common/input/synthetic_web_input_event_builders.h" |
10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 192 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
193 tracker()->latency_component_id(), 0, now, 1); | 193 tracker()->latency_component_id(), 0, now, 1); |
194 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); | 194 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); |
195 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); | 195 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); |
196 tracker()->OnInputEvent(wheel, &wheel_latency); | 196 tracker()->OnInputEvent(wheel, &wheel_latency); |
197 EXPECT_TRUE(wheel_latency.FindLatency( | 197 EXPECT_TRUE(wheel_latency.FindLatency( |
198 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 198 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
199 tracker()->latency_component_id(), nullptr)); | 199 tracker()->latency_component_id(), nullptr)); |
200 EXPECT_TRUE(wheel_latency.FindLatency( | 200 EXPECT_TRUE(wheel_latency.FindLatency( |
201 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 201 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
202 EXPECT_EQ(1U, wheel_latency.input_coordinates_size()); | |
203 tracker()->OnInputEventAck(wheel, &wheel_latency, | 202 tracker()->OnInputEventAck(wheel, &wheel_latency, |
204 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 203 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
205 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); | 204 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); |
206 | 205 |
207 // Rappor metrics. | 206 // Rappor metrics. |
208 EXPECT_TRUE( | 207 EXPECT_TRUE( |
209 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." | 208 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." |
210 "TimeToScrollUpdateSwapBegin2", | 209 "TimeToScrollUpdateSwapBegin2", |
211 0)); | 210 0)); |
212 EXPECT_TRUE( | 211 EXPECT_TRUE( |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 283 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
285 tracker()->latency_component_id(), 0, now, 1); | 284 tracker()->latency_component_id(), 0, now, 1); |
286 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); | 285 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); |
287 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); | 286 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); |
288 tracker()->OnInputEvent(wheel, &wheel_latency); | 287 tracker()->OnInputEvent(wheel, &wheel_latency); |
289 EXPECT_TRUE(wheel_latency.FindLatency( | 288 EXPECT_TRUE(wheel_latency.FindLatency( |
290 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 289 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
291 tracker()->latency_component_id(), nullptr)); | 290 tracker()->latency_component_id(), nullptr)); |
292 EXPECT_TRUE(wheel_latency.FindLatency( | 291 EXPECT_TRUE(wheel_latency.FindLatency( |
293 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 292 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
294 EXPECT_EQ(1U, wheel_latency.input_coordinates_size()); | |
295 tracker()->OnInputEventAck(wheel, &wheel_latency, | 293 tracker()->OnInputEventAck(wheel, &wheel_latency, |
296 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 294 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
297 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); | 295 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); |
298 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1)); | 296 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1)); |
299 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1)); | 297 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1)); |
300 | 298 |
301 EXPECT_TRUE( | 299 EXPECT_TRUE( |
302 HistogramSizeEq("Event.Latency.ScrollBegin.Wheel." | 300 HistogramSizeEq("Event.Latency.ScrollBegin.Wheel." |
303 "TimeToScrollUpdateSwapBegin2", | 301 "TimeToScrollUpdateSwapBegin2", |
304 0)); | 302 0)); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 358 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
361 tracker()->latency_component_id(), 0, now, 1); | 359 tracker()->latency_component_id(), 0, now, 1); |
362 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); | 360 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); |
363 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); | 361 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); |
364 tracker()->OnInputEvent(scroll, &scroll_latency); | 362 tracker()->OnInputEvent(scroll, &scroll_latency); |
365 EXPECT_TRUE(scroll_latency.FindLatency( | 363 EXPECT_TRUE(scroll_latency.FindLatency( |
366 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 364 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
367 tracker()->latency_component_id(), nullptr)); | 365 tracker()->latency_component_id(), nullptr)); |
368 EXPECT_TRUE(scroll_latency.FindLatency( | 366 EXPECT_TRUE(scroll_latency.FindLatency( |
369 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 367 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
370 EXPECT_EQ(1U, scroll_latency.input_coordinates_size()); | |
371 tracker()->OnInputEventAck(scroll, &scroll_latency, | 368 tracker()->OnInputEventAck(scroll, &scroll_latency, |
372 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 369 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
373 } | 370 } |
374 | 371 |
375 { | 372 { |
376 SyntheticWebTouchEvent touch; | 373 SyntheticWebTouchEvent touch; |
377 touch.PressPoint(0, 0); | 374 touch.PressPoint(0, 0); |
378 touch.PressPoint(1, 1); | 375 touch.PressPoint(1, 1); |
379 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); | 376 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); |
380 base::TimeTicks now = base::TimeTicks::Now(); | 377 base::TimeTicks now = base::TimeTicks::Now(); |
381 touch_latency.AddLatencyNumberWithTimestamp( | 378 touch_latency.AddLatencyNumberWithTimestamp( |
382 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 379 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
383 tracker()->latency_component_id(), 0, now, 1); | 380 tracker()->latency_component_id(), 0, now, 1); |
384 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); | 381 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); |
385 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); | 382 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); |
386 tracker()->OnInputEvent(touch, &touch_latency); | 383 tracker()->OnInputEvent(touch, &touch_latency); |
387 EXPECT_TRUE(touch_latency.FindLatency( | 384 EXPECT_TRUE(touch_latency.FindLatency( |
388 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 385 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
389 tracker()->latency_component_id(), nullptr)); | 386 tracker()->latency_component_id(), nullptr)); |
390 EXPECT_TRUE(touch_latency.FindLatency( | 387 EXPECT_TRUE(touch_latency.FindLatency( |
391 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 388 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
392 EXPECT_EQ(2U, touch_latency.input_coordinates_size()); | |
393 tracker()->OnInputEventAck(touch, &touch_latency, | 389 tracker()->OnInputEventAck(touch, &touch_latency, |
394 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 390 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
395 tracker()->OnGpuSwapBuffersCompleted(touch_latency); | 391 tracker()->OnGpuSwapBuffersCompleted(touch_latency); |
396 } | 392 } |
397 | 393 |
398 // Rappor metrics. | 394 // Rappor metrics. |
399 EXPECT_TRUE( | 395 EXPECT_TRUE( |
400 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." | 396 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." |
401 "TimeToScrollUpdateSwapBegin2", | 397 "TimeToScrollUpdateSwapBegin2", |
402 0)); | 398 0)); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 476 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
481 tracker()->latency_component_id(), 0, now, 1); | 477 tracker()->latency_component_id(), 0, now, 1); |
482 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); | 478 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); |
483 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); | 479 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); |
484 tracker()->OnInputEvent(scroll, &scroll_latency); | 480 tracker()->OnInputEvent(scroll, &scroll_latency); |
485 EXPECT_TRUE(scroll_latency.FindLatency( | 481 EXPECT_TRUE(scroll_latency.FindLatency( |
486 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 482 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
487 tracker()->latency_component_id(), nullptr)); | 483 tracker()->latency_component_id(), nullptr)); |
488 EXPECT_TRUE(scroll_latency.FindLatency( | 484 EXPECT_TRUE(scroll_latency.FindLatency( |
489 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 485 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
490 EXPECT_EQ(1U, scroll_latency.input_coordinates_size()); | |
491 tracker()->OnInputEventAck(scroll, &scroll_latency, | 486 tracker()->OnInputEventAck(scroll, &scroll_latency, |
492 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 487 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
493 } | 488 } |
494 | 489 |
495 { | 490 { |
496 SyntheticWebTouchEvent touch; | 491 SyntheticWebTouchEvent touch; |
497 touch.PressPoint(0, 0); | 492 touch.PressPoint(0, 0); |
498 touch.PressPoint(1, 1); | 493 touch.PressPoint(1, 1); |
499 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); | 494 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); |
500 base::TimeTicks now = base::TimeTicks::Now(); | 495 base::TimeTicks now = base::TimeTicks::Now(); |
501 touch_latency.AddLatencyNumberWithTimestamp( | 496 touch_latency.AddLatencyNumberWithTimestamp( |
502 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 497 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
503 tracker()->latency_component_id(), 0, now, 1); | 498 tracker()->latency_component_id(), 0, now, 1); |
504 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); | 499 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); |
505 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); | 500 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); |
506 tracker()->OnInputEvent(touch, &touch_latency); | 501 tracker()->OnInputEvent(touch, &touch_latency); |
507 EXPECT_TRUE(touch_latency.FindLatency( | 502 EXPECT_TRUE(touch_latency.FindLatency( |
508 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 503 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
509 tracker()->latency_component_id(), nullptr)); | 504 tracker()->latency_component_id(), nullptr)); |
510 EXPECT_TRUE(touch_latency.FindLatency( | 505 EXPECT_TRUE(touch_latency.FindLatency( |
511 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 506 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
512 EXPECT_EQ(2U, touch_latency.input_coordinates_size()); | |
513 tracker()->OnInputEventAck(touch, &touch_latency, | 507 tracker()->OnInputEventAck(touch, &touch_latency, |
514 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 508 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
515 tracker()->OnGpuSwapBuffersCompleted(touch_latency); | 509 tracker()->OnGpuSwapBuffersCompleted(touch_latency); |
516 } | 510 } |
517 | 511 |
518 // Rappor metrics. | 512 // Rappor metrics. |
519 EXPECT_TRUE( | 513 EXPECT_TRUE( |
520 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." | 514 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." |
521 "TimeToScrollUpdateSwapBegin2", | 515 "TimeToScrollUpdateSwapBegin2", |
522 2)); | 516 2)); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Main", 0)); | 654 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Main", 0)); |
661 EXPECT_TRUE(HistogramSizeEq( | 655 EXPECT_TRUE(HistogramSizeEq( |
662 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Impl", 0)); | 656 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Impl", 0)); |
663 EXPECT_TRUE(HistogramSizeEq( | 657 EXPECT_TRUE(HistogramSizeEq( |
664 "Event.Latency.ScrollUpdate.RendererSwapToBrowserNotified", 0)); | 658 "Event.Latency.ScrollUpdate.RendererSwapToBrowserNotified", 0)); |
665 EXPECT_TRUE(HistogramSizeEq( | 659 EXPECT_TRUE(HistogramSizeEq( |
666 "Event.Latency.ScrollUpdate.BrowserNotifiedToBeforeGpuSwap", 0)); | 660 "Event.Latency.ScrollUpdate.BrowserNotifiedToBeforeGpuSwap", 0)); |
667 EXPECT_TRUE(HistogramSizeEq("Event.Latency.ScrollUpdate.GpuSwap", 0)); | 661 EXPECT_TRUE(HistogramSizeEq("Event.Latency.ScrollUpdate.GpuSwap", 0)); |
668 } | 662 } |
669 | 663 |
670 TEST_F(RenderWidgetHostLatencyTrackerTest, InputCoordinatesPopulated) { | |
671 { | |
672 auto event = | |
673 SyntheticWebMouseWheelEventBuilder::Build(0, 0, -5, 0, 0, true); | |
674 event.setPositionInWidget(100, 200); | |
675 ui::LatencyInfo latency_info; | |
676 tracker()->OnInputEvent(event, &latency_info); | |
677 EXPECT_EQ(1u, latency_info.input_coordinates_size()); | |
678 EXPECT_EQ(100, latency_info.input_coordinates()[0].x()); | |
679 EXPECT_EQ(200, latency_info.input_coordinates()[0].y()); | |
680 } | |
681 | |
682 { | |
683 auto event = SyntheticWebMouseEventBuilder::Build(WebInputEvent::MouseMove); | |
684 event.setPositionInWidget(300, 400); | |
685 ui::LatencyInfo latency_info; | |
686 tracker()->OnInputEvent(event, &latency_info); | |
687 EXPECT_EQ(1u, latency_info.input_coordinates_size()); | |
688 EXPECT_EQ(300, latency_info.input_coordinates()[0].x()); | |
689 EXPECT_EQ(400, latency_info.input_coordinates()[0].y()); | |
690 } | |
691 | |
692 { | |
693 auto event = SyntheticWebGestureEventBuilder::Build( | |
694 WebInputEvent::GestureScrollBegin, blink::WebGestureDeviceTouchscreen); | |
695 event.x = 500; | |
696 event.y = 600; | |
697 ui::LatencyInfo latency_info; | |
698 tracker()->OnInputEvent(event, &latency_info); | |
699 EXPECT_EQ(1u, latency_info.input_coordinates_size()); | |
700 EXPECT_EQ(500, latency_info.input_coordinates()[0].x()); | |
701 EXPECT_EQ(600, latency_info.input_coordinates()[0].y()); | |
702 } | |
703 | |
704 { | |
705 SyntheticWebTouchEvent event; | |
706 event.PressPoint(700, 800); | |
707 event.PressPoint(900, 1000); | |
708 event.PressPoint(1100, 1200); // LatencyInfo only holds two coordinates. | |
709 ui::LatencyInfo latency_info; | |
710 tracker()->OnInputEvent(event, &latency_info); | |
711 EXPECT_EQ(2u, latency_info.input_coordinates_size()); | |
712 EXPECT_EQ(700, latency_info.input_coordinates()[0].x()); | |
713 EXPECT_EQ(800, latency_info.input_coordinates()[0].y()); | |
714 EXPECT_EQ(900, latency_info.input_coordinates()[1].x()); | |
715 EXPECT_EQ(1000, latency_info.input_coordinates()[1].y()); | |
716 } | |
717 | |
718 { | |
719 NativeWebKeyboardEvent event(blink::WebKeyboardEvent::KeyDown, | |
720 blink::WebInputEvent::NoModifiers, | |
721 base::TimeTicks::Now()); | |
722 ui::LatencyInfo latency_info; | |
723 tracker()->OnInputEvent(event, &latency_info); | |
724 EXPECT_EQ(0u, latency_info.input_coordinates_size()); | |
725 } | |
726 } | |
727 | |
728 TEST_F(RenderWidgetHostLatencyTrackerTest, ScrollLatency) { | 664 TEST_F(RenderWidgetHostLatencyTrackerTest, ScrollLatency) { |
729 auto scroll_begin = SyntheticWebGestureEventBuilder::BuildScrollBegin( | 665 auto scroll_begin = SyntheticWebGestureEventBuilder::BuildScrollBegin( |
730 5, -5, blink::WebGestureDeviceTouchscreen); | 666 5, -5, blink::WebGestureDeviceTouchscreen); |
731 ui::LatencyInfo scroll_latency; | 667 ui::LatencyInfo scroll_latency; |
732 scroll_latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, | 668 scroll_latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, |
733 0); | 669 0); |
734 tracker()->OnInputEvent(scroll_begin, &scroll_latency); | 670 tracker()->OnInputEvent(scroll_begin, &scroll_latency); |
735 EXPECT_TRUE( | 671 EXPECT_TRUE( |
736 scroll_latency.FindLatency(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 672 scroll_latency.FindLatency(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
737 tracker()->latency_component_id(), nullptr)); | 673 tracker()->latency_component_id(), nullptr)); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 "Event.Latency.BlockingTime.TouchEndDefaultPrevented"), | 894 "Event.Latency.BlockingTime.TouchEndDefaultPrevented"), |
959 ElementsAre(Bucket( | 895 ElementsAre(Bucket( |
960 touchend_timestamps_ms[2] - touchend_timestamps_ms[1], 1))); | 896 touchend_timestamps_ms[2] - touchend_timestamps_ms[1], 1))); |
961 EXPECT_THAT(histogram_tester().GetAllSamples( | 897 EXPECT_THAT(histogram_tester().GetAllSamples( |
962 "Event.Latency.BlockingTime.TouchEndDefaultAllowed"), | 898 "Event.Latency.BlockingTime.TouchEndDefaultAllowed"), |
963 ElementsAre(Bucket( | 899 ElementsAre(Bucket( |
964 touchend_timestamps_ms[2] - touchend_timestamps_ms[1], 1))); | 900 touchend_timestamps_ms[2] - touchend_timestamps_ms[1], 1))); |
965 } | 901 } |
966 | 902 |
967 } // namespace content | 903 } // namespace content |
OLD | NEW |