Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/layout/LayoutTestHelper.h" | |
| 6 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" | |
| 7 #include "platform/testing/UnitTestHelpers.h" | |
| 8 #include "testing/gtest/include/gtest/gtest.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class TransformPaintPropertyNode; | |
| 13 class ClipPaintPropertyNode; | |
| 14 class ScrollPaintPropertyNode; | |
| 15 class LayoutPoint; | |
| 16 | |
| 17 typedef bool TestParamRootLayerScrolling; | |
| 18 class PaintPropertyTreeBuilderTest | |
| 19 : public ::testing::WithParamInterface<TestParamRootLayerScrolling>, | |
| 20 private ScopedSlimmingPaintV2ForTest, | |
| 21 private ScopedRootLayerScrollingForTest, | |
| 22 public RenderingTest { | |
| 23 public: | |
| 24 PaintPropertyTreeBuilderTest() | |
| 25 : ScopedSlimmingPaintV2ForTest(true), | |
| 26 ScopedRootLayerScrollingForTest(GetParam()), | |
| 27 RenderingTest(SingleChildFrameLoaderClient::create()) {} | |
| 28 | |
| 29 void loadTestData(const char* fileName); | |
| 30 const TransformPaintPropertyNode* framePreTranslation(); | |
| 31 const TransformPaintPropertyNode* frameScrollTranslation(); | |
| 32 const ClipPaintPropertyNode* frameContentClip(); | |
| 33 const ScrollPaintPropertyNode* frameScroll(FrameView* = nullptr); | |
| 34 LayoutPoint paintOffset(const LayoutObject*); | |
| 35 | |
| 36 private: | |
| 37 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.
| |
| 38 Settings::setMockScrollbarsEnabled(true); | |
| 39 | |
| 40 RenderingTest::SetUp(); | |
| 41 enableCompositing(); | |
| 42 } | |
| 43 | |
| 44 void TearDown() override { | |
| 45 RenderingTest::TearDown(); | |
| 46 | |
| 47 Settings::setMockScrollbarsEnabled(false); | |
| 48 } | |
| 49 }; | |
| 50 | |
| 51 } // namespace blink | |
| OLD | NEW |