| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 191 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
| 192 tracker()->latency_component_id(), 0, now, 1); | 192 tracker()->latency_component_id(), 0, now, 1); |
| 193 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); | 193 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); |
| 194 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); | 194 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); |
| 195 tracker()->OnInputEvent(wheel, &wheel_latency); | 195 tracker()->OnInputEvent(wheel, &wheel_latency); |
| 196 EXPECT_TRUE(wheel_latency.FindLatency( | 196 EXPECT_TRUE(wheel_latency.FindLatency( |
| 197 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 197 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 198 tracker()->latency_component_id(), nullptr)); | 198 tracker()->latency_component_id(), nullptr)); |
| 199 EXPECT_TRUE(wheel_latency.FindLatency( | 199 EXPECT_TRUE(wheel_latency.FindLatency( |
| 200 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 200 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
| 201 EXPECT_EQ(1U, wheel_latency.input_coordinates_size()); | |
| 202 tracker()->OnInputEventAck(wheel, &wheel_latency, | 201 tracker()->OnInputEventAck(wheel, &wheel_latency, |
| 203 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 202 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 204 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); | 203 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); |
| 205 | 204 |
| 206 // Rappor metrics. | 205 // Rappor metrics. |
| 207 EXPECT_TRUE( | 206 EXPECT_TRUE( |
| 208 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." | 207 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." |
| 209 "TimeToScrollUpdateSwapBegin2", | 208 "TimeToScrollUpdateSwapBegin2", |
| 210 0)); | 209 0)); |
| 211 EXPECT_TRUE( | 210 EXPECT_TRUE( |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 282 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
| 284 tracker()->latency_component_id(), 0, now, 1); | 283 tracker()->latency_component_id(), 0, now, 1); |
| 285 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); | 284 AddFakeComponentsWithTimeStamp(*tracker(), &wheel_latency, now); |
| 286 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); | 285 AddRenderingScheduledComponent(&wheel_latency, rendering_on_main, now); |
| 287 tracker()->OnInputEvent(wheel, &wheel_latency); | 286 tracker()->OnInputEvent(wheel, &wheel_latency); |
| 288 EXPECT_TRUE(wheel_latency.FindLatency( | 287 EXPECT_TRUE(wheel_latency.FindLatency( |
| 289 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 288 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 290 tracker()->latency_component_id(), nullptr)); | 289 tracker()->latency_component_id(), nullptr)); |
| 291 EXPECT_TRUE(wheel_latency.FindLatency( | 290 EXPECT_TRUE(wheel_latency.FindLatency( |
| 292 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 291 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
| 293 EXPECT_EQ(1U, wheel_latency.input_coordinates_size()); | |
| 294 tracker()->OnInputEventAck(wheel, &wheel_latency, | 292 tracker()->OnInputEventAck(wheel, &wheel_latency, |
| 295 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 293 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 296 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); | 294 tracker()->OnGpuSwapBuffersCompleted(wheel_latency); |
| 297 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1)); | 295 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1)); |
| 298 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1)); | 296 EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1)); |
| 299 | 297 |
| 300 EXPECT_TRUE( | 298 EXPECT_TRUE( |
| 301 HistogramSizeEq("Event.Latency.ScrollBegin.Wheel." | 299 HistogramSizeEq("Event.Latency.ScrollBegin.Wheel." |
| 302 "TimeToScrollUpdateSwapBegin2", | 300 "TimeToScrollUpdateSwapBegin2", |
| 303 0)); | 301 0)); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 357 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
| 360 tracker()->latency_component_id(), 0, now, 1); | 358 tracker()->latency_component_id(), 0, now, 1); |
| 361 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); | 359 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); |
| 362 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); | 360 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); |
| 363 tracker()->OnInputEvent(scroll, &scroll_latency); | 361 tracker()->OnInputEvent(scroll, &scroll_latency); |
| 364 EXPECT_TRUE(scroll_latency.FindLatency( | 362 EXPECT_TRUE(scroll_latency.FindLatency( |
| 365 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 363 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 366 tracker()->latency_component_id(), nullptr)); | 364 tracker()->latency_component_id(), nullptr)); |
| 367 EXPECT_TRUE(scroll_latency.FindLatency( | 365 EXPECT_TRUE(scroll_latency.FindLatency( |
| 368 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 366 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
| 369 EXPECT_EQ(1U, scroll_latency.input_coordinates_size()); | |
| 370 tracker()->OnInputEventAck(scroll, &scroll_latency, | 367 tracker()->OnInputEventAck(scroll, &scroll_latency, |
| 371 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 368 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 372 } | 369 } |
| 373 | 370 |
| 374 { | 371 { |
| 375 SyntheticWebTouchEvent touch; | 372 SyntheticWebTouchEvent touch; |
| 376 touch.PressPoint(0, 0); | 373 touch.PressPoint(0, 0); |
| 377 touch.PressPoint(1, 1); | 374 touch.PressPoint(1, 1); |
| 378 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); | 375 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); |
| 379 base::TimeTicks now = base::TimeTicks::Now(); | 376 base::TimeTicks now = base::TimeTicks::Now(); |
| 380 touch_latency.AddLatencyNumberWithTimestamp( | 377 touch_latency.AddLatencyNumberWithTimestamp( |
| 381 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 378 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
| 382 tracker()->latency_component_id(), 0, now, 1); | 379 tracker()->latency_component_id(), 0, now, 1); |
| 383 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); | 380 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); |
| 384 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); | 381 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); |
| 385 tracker()->OnInputEvent(touch, &touch_latency); | 382 tracker()->OnInputEvent(touch, &touch_latency); |
| 386 EXPECT_TRUE(touch_latency.FindLatency( | 383 EXPECT_TRUE(touch_latency.FindLatency( |
| 387 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 384 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 388 tracker()->latency_component_id(), nullptr)); | 385 tracker()->latency_component_id(), nullptr)); |
| 389 EXPECT_TRUE(touch_latency.FindLatency( | 386 EXPECT_TRUE(touch_latency.FindLatency( |
| 390 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 387 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
| 391 EXPECT_EQ(2U, touch_latency.input_coordinates_size()); | |
| 392 tracker()->OnInputEventAck(touch, &touch_latency, | 388 tracker()->OnInputEventAck(touch, &touch_latency, |
| 393 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 389 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 394 tracker()->OnGpuSwapBuffersCompleted(touch_latency); | 390 tracker()->OnGpuSwapBuffersCompleted(touch_latency); |
| 395 } | 391 } |
| 396 | 392 |
| 397 // Rappor metrics. | 393 // Rappor metrics. |
| 398 EXPECT_TRUE( | 394 EXPECT_TRUE( |
| 399 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." | 395 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." |
| 400 "TimeToScrollUpdateSwapBegin2", | 396 "TimeToScrollUpdateSwapBegin2", |
| 401 0)); | 397 0)); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 475 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
| 480 tracker()->latency_component_id(), 0, now, 1); | 476 tracker()->latency_component_id(), 0, now, 1); |
| 481 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); | 477 AddFakeComponentsWithTimeStamp(*tracker(), &scroll_latency, now); |
| 482 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); | 478 AddRenderingScheduledComponent(&scroll_latency, rendering_on_main, now); |
| 483 tracker()->OnInputEvent(scroll, &scroll_latency); | 479 tracker()->OnInputEvent(scroll, &scroll_latency); |
| 484 EXPECT_TRUE(scroll_latency.FindLatency( | 480 EXPECT_TRUE(scroll_latency.FindLatency( |
| 485 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 481 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 486 tracker()->latency_component_id(), nullptr)); | 482 tracker()->latency_component_id(), nullptr)); |
| 487 EXPECT_TRUE(scroll_latency.FindLatency( | 483 EXPECT_TRUE(scroll_latency.FindLatency( |
| 488 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 484 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
| 489 EXPECT_EQ(1U, scroll_latency.input_coordinates_size()); | |
| 490 tracker()->OnInputEventAck(scroll, &scroll_latency, | 485 tracker()->OnInputEventAck(scroll, &scroll_latency, |
| 491 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 486 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 492 } | 487 } |
| 493 | 488 |
| 494 { | 489 { |
| 495 SyntheticWebTouchEvent touch; | 490 SyntheticWebTouchEvent touch; |
| 496 touch.PressPoint(0, 0); | 491 touch.PressPoint(0, 0); |
| 497 touch.PressPoint(1, 1); | 492 touch.PressPoint(1, 1); |
| 498 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); | 493 ui::LatencyInfo touch_latency(ui::SourceEventType::TOUCH); |
| 499 base::TimeTicks now = base::TimeTicks::Now(); | 494 base::TimeTicks now = base::TimeTicks::Now(); |
| 500 touch_latency.AddLatencyNumberWithTimestamp( | 495 touch_latency.AddLatencyNumberWithTimestamp( |
| 501 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, | 496 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, |
| 502 tracker()->latency_component_id(), 0, now, 1); | 497 tracker()->latency_component_id(), 0, now, 1); |
| 503 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); | 498 AddFakeComponentsWithTimeStamp(*tracker(), &touch_latency, now); |
| 504 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); | 499 AddRenderingScheduledComponent(&touch_latency, rendering_on_main, now); |
| 505 tracker()->OnInputEvent(touch, &touch_latency); | 500 tracker()->OnInputEvent(touch, &touch_latency); |
| 506 EXPECT_TRUE(touch_latency.FindLatency( | 501 EXPECT_TRUE(touch_latency.FindLatency( |
| 507 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 502 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 508 tracker()->latency_component_id(), nullptr)); | 503 tracker()->latency_component_id(), nullptr)); |
| 509 EXPECT_TRUE(touch_latency.FindLatency( | 504 EXPECT_TRUE(touch_latency.FindLatency( |
| 510 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); | 505 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, nullptr)); |
| 511 EXPECT_EQ(2U, touch_latency.input_coordinates_size()); | |
| 512 tracker()->OnInputEventAck(touch, &touch_latency, | 506 tracker()->OnInputEventAck(touch, &touch_latency, |
| 513 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 507 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 514 tracker()->OnGpuSwapBuffersCompleted(touch_latency); | 508 tracker()->OnGpuSwapBuffersCompleted(touch_latency); |
| 515 } | 509 } |
| 516 | 510 |
| 517 // Rappor metrics. | 511 // Rappor metrics. |
| 518 EXPECT_TRUE( | 512 EXPECT_TRUE( |
| 519 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." | 513 RapporSampleAssert("Event.Latency.ScrollUpdate.Touch." |
| 520 "TimeToScrollUpdateSwapBegin2", | 514 "TimeToScrollUpdateSwapBegin2", |
| 521 2)); | 515 2)); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Main", 0)); | 653 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Main", 0)); |
| 660 EXPECT_TRUE(HistogramSizeEq( | 654 EXPECT_TRUE(HistogramSizeEq( |
| 661 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Impl", 0)); | 655 "Event.Latency.ScrollUpdate.HandledToRendererSwap_Impl", 0)); |
| 662 EXPECT_TRUE(HistogramSizeEq( | 656 EXPECT_TRUE(HistogramSizeEq( |
| 663 "Event.Latency.ScrollUpdate.RendererSwapToBrowserNotified", 0)); | 657 "Event.Latency.ScrollUpdate.RendererSwapToBrowserNotified", 0)); |
| 664 EXPECT_TRUE(HistogramSizeEq( | 658 EXPECT_TRUE(HistogramSizeEq( |
| 665 "Event.Latency.ScrollUpdate.BrowserNotifiedToBeforeGpuSwap", 0)); | 659 "Event.Latency.ScrollUpdate.BrowserNotifiedToBeforeGpuSwap", 0)); |
| 666 EXPECT_TRUE(HistogramSizeEq("Event.Latency.ScrollUpdate.GpuSwap", 0)); | 660 EXPECT_TRUE(HistogramSizeEq("Event.Latency.ScrollUpdate.GpuSwap", 0)); |
| 667 } | 661 } |
| 668 | 662 |
| 669 TEST_F(RenderWidgetHostLatencyTrackerTest, InputCoordinatesPopulated) { | |
| 670 { | |
| 671 auto event = | |
| 672 SyntheticWebMouseWheelEventBuilder::Build(0, 0, -5, 0, 0, true); | |
| 673 event.SetPositionInWidget(100, 200); | |
| 674 ui::LatencyInfo latency_info; | |
| 675 tracker()->OnInputEvent(event, &latency_info); | |
| 676 EXPECT_EQ(1u, latency_info.input_coordinates_size()); | |
| 677 EXPECT_EQ(100, latency_info.input_coordinates()[0].x()); | |
| 678 EXPECT_EQ(200, latency_info.input_coordinates()[0].y()); | |
| 679 } | |
| 680 | |
| 681 { | |
| 682 auto event = | |
| 683 SyntheticWebMouseEventBuilder::Build(WebInputEvent::kMouseMove); | |
| 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::kGestureScrollBegin, | |
| 695 blink::kWebGestureDeviceTouchscreen); | |
| 696 event.x = 500; | |
| 697 event.y = 600; | |
| 698 ui::LatencyInfo latency_info; | |
| 699 tracker()->OnInputEvent(event, &latency_info); | |
| 700 EXPECT_EQ(1u, latency_info.input_coordinates_size()); | |
| 701 EXPECT_EQ(500, latency_info.input_coordinates()[0].x()); | |
| 702 EXPECT_EQ(600, latency_info.input_coordinates()[0].y()); | |
| 703 } | |
| 704 | |
| 705 { | |
| 706 SyntheticWebTouchEvent event; | |
| 707 event.PressPoint(700, 800); | |
| 708 event.PressPoint(900, 1000); | |
| 709 event.PressPoint(1100, 1200); // LatencyInfo only holds two coordinates. | |
| 710 ui::LatencyInfo latency_info; | |
| 711 tracker()->OnInputEvent(event, &latency_info); | |
| 712 EXPECT_EQ(2u, latency_info.input_coordinates_size()); | |
| 713 EXPECT_EQ(700, latency_info.input_coordinates()[0].x()); | |
| 714 EXPECT_EQ(800, latency_info.input_coordinates()[0].y()); | |
| 715 EXPECT_EQ(900, latency_info.input_coordinates()[1].x()); | |
| 716 EXPECT_EQ(1000, latency_info.input_coordinates()[1].y()); | |
| 717 } | |
| 718 | |
| 719 { | |
| 720 NativeWebKeyboardEvent event(blink::WebKeyboardEvent::kKeyDown, | |
| 721 blink::WebInputEvent::kNoModifiers, | |
| 722 base::TimeTicks::Now()); | |
| 723 ui::LatencyInfo latency_info; | |
| 724 tracker()->OnInputEvent(event, &latency_info); | |
| 725 EXPECT_EQ(0u, latency_info.input_coordinates_size()); | |
| 726 } | |
| 727 } | |
| 728 | |
| 729 TEST_F(RenderWidgetHostLatencyTrackerTest, ScrollLatency) { | 663 TEST_F(RenderWidgetHostLatencyTrackerTest, ScrollLatency) { |
| 730 auto scroll_begin = SyntheticWebGestureEventBuilder::BuildScrollBegin( | 664 auto scroll_begin = SyntheticWebGestureEventBuilder::BuildScrollBegin( |
| 731 5, -5, blink::kWebGestureDeviceTouchscreen); | 665 5, -5, blink::kWebGestureDeviceTouchscreen); |
| 732 ui::LatencyInfo scroll_latency; | 666 ui::LatencyInfo scroll_latency; |
| 733 scroll_latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, | 667 scroll_latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, |
| 734 0); | 668 0); |
| 735 tracker()->OnInputEvent(scroll_begin, &scroll_latency); | 669 tracker()->OnInputEvent(scroll_begin, &scroll_latency); |
| 736 EXPECT_TRUE( | 670 EXPECT_TRUE( |
| 737 scroll_latency.FindLatency(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 671 scroll_latency.FindLatency(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 738 tracker()->latency_component_id(), nullptr)); | 672 tracker()->latency_component_id(), nullptr)); |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 | 1013 |
| 1080 tracker()->OnInputEventAck(wheel_event, &latency, ack_state); | 1014 tracker()->OnInputEventAck(wheel_event, &latency, ack_state); |
| 1081 } | 1015 } |
| 1082 | 1016 |
| 1083 EXPECT_THAT(histogram_tester().GetAllSamples( | 1017 EXPECT_THAT(histogram_tester().GetAllSamples( |
| 1084 "Event.Latency.QueueingTime.MouseWheelDefaultAllowed"), | 1018 "Event.Latency.QueueingTime.MouseWheelDefaultAllowed"), |
| 1085 ElementsAre(Bucket(14, 1))); | 1019 ElementsAre(Bucket(14, 1))); |
| 1086 } | 1020 } |
| 1087 | 1021 |
| 1088 } // namespace content | 1022 } // namespace content |
| OLD | NEW |