| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/FrameView.h" | 5 #include "core/frame/FrameView.h" |
| 6 #include "core/layout/LayoutBoxModelObject.h" | 6 #include "core/layout/LayoutBoxModelObject.h" |
| 7 #include "core/layout/LayoutTestHelper.h" | 7 #include "core/layout/LayoutTestHelper.h" |
| 8 #include "core/layout/api/LayoutViewItem.h" | 8 #include "core/layout/api/LayoutViewItem.h" |
| 9 #include "core/paint/PaintLayer.h" | 9 #include "core/paint/PaintLayer.h" |
| 10 #include "core/paint/PaintLayerScrollableArea.h" | 10 #include "core/paint/PaintLayerScrollableArea.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class PaintLayerScrollableAreaTest : public RenderingTest { | 15 class PaintLayerScrollableAreaTest : public RenderingTest { |
| 16 public: | 16 public: |
| 17 PaintLayerScrollableAreaTest() | 17 PaintLayerScrollableAreaTest() |
| 18 : RenderingTest(SingleChildFrameLoaderClient::create()) | 18 : RenderingTest(SingleChildFrameLoaderClient::create()) |
| 19 { } | 19 { } |
| 20 | 20 |
| 21 bool shouldPaintBackgroundOntoScrollingContentsLayer(const char* elementId) |
| 22 { |
| 23 PaintLayer* paintLayer = toLayoutBlock(getLayoutObjectByElementId(elemen
tId))->layer(); |
| 24 return paintLayer->shouldPaintBackgroundOntoScrollingContentsLayer(); |
| 25 } |
| 26 |
| 21 private: | 27 private: |
| 22 void SetUp() override | 28 void SetUp() override |
| 23 { | 29 { |
| 24 RenderingTest::SetUp(); | 30 RenderingTest::SetUp(); |
| 25 enableCompositing(); | 31 enableCompositing(); |
| 26 } | 32 } |
| 27 | 33 |
| 28 void TearDown() override | 34 void TearDown() override |
| 29 { | 35 { |
| 30 RenderingTest::TearDown(); | 36 RenderingTest::TearDown(); |
| 31 } | 37 } |
| 32 }; | 38 }; |
| 33 | 39 |
| 34 } | 40 } |
| OLD | NEW |