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

Unified Diff: ui/events/blink/input_handler_proxy_unittest.cc

Issue 1802743002: Deflake input_handler_proxy_unittest.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/input_handler_proxy_unittest.cc
diff --git a/ui/events/blink/input_handler_proxy_unittest.cc b/ui/events/blink/input_handler_proxy_unittest.cc
index f3545d718fdb33265a74277d62792ea1961d28fb..5e3239f88a1895b4b6f994e7feb1de792c3a6998 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -387,6 +387,10 @@ class InputHandlerProxyTest
input_handler_->set_use_gesture_events_for_mouse_wheel(value);
}
+ base::HistogramTester& histogram_tester() {
+ return histogram_tester_;
+ }
+
protected:
const bool synchronous_root_scroll_;
const bool install_synchronous_handler_;
@@ -397,6 +401,7 @@ class InputHandlerProxyTest
testing::StrictMock<MockInputHandlerProxyClient> mock_client_;
WebGestureEvent gesture_;
InputHandlerProxy::EventDisposition expected_disposition_;
+ base::HistogramTester histogram_tester_;
cc::InputHandlerScrollResult scroll_result_did_scroll_;
cc::InputHandlerScrollResult scroll_result_did_not_scroll_;
};
@@ -2802,7 +2807,6 @@ TEST(SynchronousInputHandlerProxyTest, SetOffset) {
}
TEST_P(InputHandlerProxyTest, MainThreadScrollingMouseWheelHistograms) {
- base::HistogramTester histogram_tester;
input_handler_->RecordMainThreadScrollingReasonsForTest(
WebInputEvent::MouseWheel,
cc::MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects |
@@ -2811,7 +2815,7 @@ TEST_P(InputHandlerProxyTest, MainThreadScrollingMouseWheelHistograms) {
cc::MainThreadScrollingReason::kAnimatingScrollOnMainThread);
EXPECT_THAT(
- histogram_tester.GetAllSamples("Renderer4.MainThreadWheelScrollReason"),
+ histogram_tester().GetAllSamples("Renderer4.MainThreadWheelScrollReason"),
testing::ElementsAre(base::Bucket(1, 1), base::Bucket(3, 1),
base::Bucket(5, 1), base::Bucket(14, 1)));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698