Commit f6e75e95 authored by Liviu Tinta's avatar Liviu Tinta Committed by Commit Bot

[ScrollUnification] Fix CompositedScrollingMetricTest failing tests

During ScrollUnification, scrolling was moved to the compositor
thread. CompositedScrollingMetricTest tests need to be updated to
reflect this so they pass when the ScrollUnification flag is on.

Bug: 1086625
Change-Id: Ib70f4830d8007463228f9dd9b1ac41318b4bada9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364055
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800193}
parent a2f2f112
......@@ -12,6 +12,7 @@
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "cc/base/features.h"
#include "content/browser/renderer_host/input/synthetic_gesture.h"
#include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
......@@ -257,6 +258,12 @@ IN_PROC_BROWSER_TEST_P(CompositedScrollingMetricTest,
base::HistogramBase::Sample expected_bucket =
CompositingEnabled() ? kScrollingOnCompositor : kScrollingOnMain;
if (base::FeatureList::IsEnabled(::features::kScrollUnification)) {
// TODO: crbug.com/1082590
// After ScrollUnification all scrolls happen on the compositor thread
// but some will still force blocking on main thread
expected_bucket = kScrollingOnCompositor;
}
histograms.ExpectUniqueSample(kTouchHistogramName, expected_bucket, 2);
histograms.ExpectUniqueSample(kWheelHistogramName, expected_bucket, 1);
......@@ -304,6 +311,12 @@ IN_PROC_BROWSER_TEST_P(CompositedScrollingMetricTest, BlockingEventHandlers) {
base::HistogramBase::Sample expected_bucket =
CompositingEnabled() ? kScrollingOnCompositorBlockedOnMain
: kScrollingOnMain;
if (base::FeatureList::IsEnabled(::features::kScrollUnification)) {
// TODO: crbug.com/1082590
// After ScrollUnification all scrolls happen on the compositor thread
// but some will still force blocking on main thread
expected_bucket = kScrollingOnCompositorBlockedOnMain;
}
histograms.ExpectUniqueSample(kTouchHistogramName, expected_bucket, 2);
histograms.ExpectUniqueSample(kWheelHistogramName, expected_bucket, 1);
......@@ -351,6 +364,12 @@ IN_PROC_BROWSER_TEST_P(CompositedScrollingMetricTest, PassiveEventHandlers) {
base::HistogramBase::Sample expected_bucket =
CompositingEnabled() ? kScrollingOnCompositor : kScrollingOnMain;
if (base::FeatureList::IsEnabled(::features::kScrollUnification)) {
// TODO: crbug.com/1082590
// After ScrollUnification all scrolls happen on the compositor thread
// but some will still force blocking on main thread
expected_bucket = kScrollingOnCompositor;
}
histograms.ExpectUniqueSample(kTouchHistogramName, expected_bucket, 2);
histograms.ExpectUniqueSample(kWheelHistogramName, expected_bucket, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment