Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |