Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.h |
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.h b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8d33c2682affa0d9e297eed319bad03980613d5f |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.h |
| @@ -0,0 +1,51 @@ |
| +// 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()) {} |
| + |
| + void loadTestData(const char* fileName); |
| + const TransformPaintPropertyNode* framePreTranslation(); |
| + const TransformPaintPropertyNode* frameScrollTranslation(); |
| + const ClipPaintPropertyNode* frameContentClip(); |
| + const ScrollPaintPropertyNode* frameScroll(FrameView* = nullptr); |
| + LayoutPoint paintOffset(const LayoutObject*); |
| + |
| + private: |
| + void SetUp() override { |
|
wkorman
2016/12/20 01:01:15
Put impl for this and TearDown in .cpp?
pdr.
2016/12/20 02:56:00
Good idea, done.
|
| + Settings::setMockScrollbarsEnabled(true); |
| + |
| + RenderingTest::SetUp(); |
| + enableCompositing(); |
| + } |
| + |
| + void TearDown() override { |
| + RenderingTest::TearDown(); |
| + |
| + Settings::setMockScrollbarsEnabled(false); |
| + } |
| +}; |
| + |
| +} // namespace blink |