Commit bc41eea2 authored by pdr's avatar pdr Committed by Commit bot

Split paint property update tests out of PaintPropertyTreeBuilderTest

PaintPropertyTreeBuilderTest is over 3.5k lines long which is becoming
unwieldy. This patch splits out the incremental update tests.

BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2589003002
Cr-Commit-Position: refs/heads/master@{#439712}
parent 2878e413
...@@ -1265,7 +1265,9 @@ source_set("unit_tests") { ...@@ -1265,7 +1265,9 @@ source_set("unit_tests") {
"paint/PaintLayerScrollableAreaTest.cpp", "paint/PaintLayerScrollableAreaTest.cpp",
"paint/PaintLayerTest.cpp", "paint/PaintLayerTest.cpp",
"paint/PaintPropertyTreeBuilderTest.cpp", "paint/PaintPropertyTreeBuilderTest.cpp",
"paint/PaintPropertyTreeBuilderTest.h",
"paint/PaintPropertyTreePrinterTest.cpp", "paint/PaintPropertyTreePrinterTest.cpp",
"paint/PaintPropertyTreeUpdateTests.cpp",
"paint/PrePaintTreeWalkTest.cpp", "paint/PrePaintTreeWalkTest.cpp",
"paint/SVGInlineTextBoxPainterTest.cpp", "paint/SVGInlineTextBoxPainterTest.cpp",
"paint/StubChromeClientForSPv2.h", "paint/StubChromeClientForSPv2.h",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/layout/LayoutTestHelper.h"
#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include "platform/testing/UnitTestHelpers.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blink {
class TransformPaintPropertyNode;
class ClipPaintPropertyNode;
class ScrollPaintPropertyNode;
class LayoutPoint;
typedef bool TestParamRootLayerScrolling;
class PaintPropertyTreeBuilderTest
: public ::testing::WithParamInterface<TestParamRootLayerScrolling>,
private ScopedSlimmingPaintV2ForTest,
private ScopedRootLayerScrollingForTest,
public RenderingTest {
public:
PaintPropertyTreeBuilderTest()
: ScopedSlimmingPaintV2ForTest(true),
ScopedRootLayerScrollingForTest(GetParam()),
RenderingTest(SingleChildFrameLoaderClient::create()) {}
protected:
void loadTestData(const char* fileName);
// The following helpers return paint property nodes associated with the main
// FrameView, accounting for differences from the RootLayerScrolls setting.
const TransformPaintPropertyNode* framePreTranslation();
const TransformPaintPropertyNode* frameScrollTranslation();
const ClipPaintPropertyNode* frameContentClip();
const ScrollPaintPropertyNode* frameScroll(FrameView* = nullptr);
// Return the local border box's paint offset. For more details, see
// ObjectPaintProperties::localBorderBoxProperties().
LayoutPoint paintOffset(const LayoutObject*);
private:
void SetUp() override;
void TearDown() override;
};
} // namespace blink
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