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

Side by Side Diff: ui/events/blink/input_handler_proxy_unittest.cc

Issue 2289593006: Fix recording of kAnimatingScrollOnMain (Closed)
Patch Set: update unit test. Created 4 years, 3 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
« no previous file with comments | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/events/blink/input_handler_proxy.h" 5 #include "ui/events/blink/input_handler_proxy.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/test/histogram_tester.h" 10 #include "base/test/histogram_tester.h"
(...skipping 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 testing::Mock::VerifyAndClearExpectations(&mock_client); 2773 testing::Mock::VerifyAndClearExpectations(&mock_client);
2774 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler); 2774 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler);
2775 } 2775 }
2776 2776
2777 TEST_P(InputHandlerProxyTest, MainThreadScrollingMouseWheelHistograms) { 2777 TEST_P(InputHandlerProxyTest, MainThreadScrollingMouseWheelHistograms) {
2778 input_handler_->RecordMainThreadScrollingReasonsForTest( 2778 input_handler_->RecordMainThreadScrollingReasonsForTest(
2779 blink::WebGestureDeviceTouchpad, 2779 blink::WebGestureDeviceTouchpad,
2780 cc::MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects | 2780 cc::MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects |
2781 cc::MainThreadScrollingReason::kThreadedScrollingDisabled | 2781 cc::MainThreadScrollingReason::kThreadedScrollingDisabled |
2782 cc::MainThreadScrollingReason::kPageOverlay | 2782 cc::MainThreadScrollingReason::kPageOverlay |
2783 cc::MainThreadScrollingReason::kAnimatingScrollOnMainThread); 2783 cc::MainThreadScrollingReason::kAnimatingScrollOnMainThread);
tdresser 2016/08/30 15:07:56 Maybe add a comment to the test indicating why ani
Ian Vollick 2016/08/30 17:55:06 Done.
2784 2784
2785 EXPECT_THAT( 2785 EXPECT_THAT(
2786 histogram_tester().GetAllSamples("Renderer4.MainThreadWheelScrollReason"), 2786 histogram_tester().GetAllSamples("Renderer4.MainThreadWheelScrollReason"),
2787 testing::ElementsAre(base::Bucket(1, 1), base::Bucket(3, 1), 2787 testing::ElementsAre(base::Bucket(1, 1), base::Bucket(3, 1),
2788 base::Bucket(5, 1)));
2789
2790 input_handler_->RecordMainThreadScrollingReasonsForTest(
2791 blink::WebGestureDeviceTouchpad,
2792 cc::MainThreadScrollingReason::kAnimatingScrollOnMainThread);
2793
2794 EXPECT_THAT(
2795 histogram_tester().GetAllSamples("Renderer4.MainThreadWheelScrollReason"),
2796 testing::ElementsAre(base::Bucket(1, 1), base::Bucket(3, 1),
2788 base::Bucket(5, 1), base::Bucket(14, 1))); 2797 base::Bucket(5, 1), base::Bucket(14, 1)));
2789 } 2798 }
2790 2799
2791 2800
2792 INSTANTIATE_TEST_CASE_P(AnimateInput, 2801 INSTANTIATE_TEST_CASE_P(AnimateInput,
2793 InputHandlerProxyTest, 2802 InputHandlerProxyTest,
2794 testing::ValuesIn(test_types)); 2803 testing::ValuesIn(test_types));
2795 } // namespace test 2804 } // namespace test
2796 } // namespace ui 2805 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698