#include "base/test/metrics/histogram_tester.h"
#include "cc/input/main_thread_scrolling_reason.h"
#include "cc/layers/picture_layer.h"
#include "cc/trees/property_tree.h"
#include "cc/trees/scroll_node.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/frame/web_frame_widget_impl.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/html_iframe_element.h"
#include "third_party/blink/renderer/core/layout/layout_embedded_content.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h"
#include "third_party/blink/renderer/platform/testing/find_cc_layer.h"
#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/url_loader_mock_factory.h"
#include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
namespace blink {
#define EXPECT_MAIN_THREAD_SCROLLING_REASON(expected, actual) …
#define EXPECT_NO_MAIN_THREAD_SCROLLING_REASON(actual) …
class MainThreadScrollingReasonsTest : public PaintTestConfigurations,
public testing::Test { … };
INSTANTIATE_PAINT_TEST_SUITE_P(…);
TEST_P(MainThreadScrollingReasonsTest,
BackgroundAttachmentFixedShouldTriggerMainThreadScroll) { … }
TEST_P(MainThreadScrollingReasonsTest, ReportBackgroundAttachmentFixed) { … }
TEST_P(MainThreadScrollingReasonsTest,
RecalculateMainThreadScrollingReasonsUponResize) { … }
TEST_P(MainThreadScrollingReasonsTest, FastScrollingForFixedPosition) { … }
TEST_P(MainThreadScrollingReasonsTest, FastScrollingForStickyPosition) { … }
TEST_P(MainThreadScrollingReasonsTest, FastScrollingByDefault) { … }
class NonCompositedMainThreadScrollingReasonsTest
: public MainThreadScrollingReasonsTest { … };
INSTANTIATE_PAINT_TEST_SUITE_P(…);
TEST_P(NonCompositedMainThreadScrollingReasonsTest, TransparentTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, TransformTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, BackgroundNotOpaqueTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest,
CantPaintScrollingBackgroundTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest,
BackgroundNeedsRepaintOnScroll) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, ClipTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, ClipPathTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, BoxShadowTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, InsetBoxShadowTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, StackingContextTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest, BorderRadiusTest) { … }
TEST_P(NonCompositedMainThreadScrollingReasonsTest,
ForcedComositingWithLCDRelatedReasons) { … }
}