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/LayoutBlock.h" |
7 #include "core/layout/LayoutTestHelper.h" | 7 #include "core/layout/LayoutTestHelper.h" |
8 #include "core/paint/PaintLayer.h" | 8 #include "core/paint/PaintLayer.h" |
9 #include "core/paint/PaintLayerScrollableArea.h" | 9 #include "core/paint/PaintLayerScrollableArea.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class PaintLayerScrollableAreaTest : public RenderingTest { | 14 class PaintLayerScrollableAreaTest : public RenderingTest { |
15 public: | 15 public: |
16 PaintLayerScrollableAreaTest() | 16 PaintLayerScrollableAreaTest() |
17 : RenderingTest(SingleChildFrameLoaderClient::create()) | 17 : RenderingTest(SingleChildFrameLoaderClient::create()) |
18 { } | 18 { } |
19 | 19 |
| 20 bool shouldPaintBackgroundOntoScrollingContentsLayer(const char* elementId) |
| 21 { |
| 22 PaintLayer* paintLayer = toLayoutBlock(getLayoutObjectByElementId(elemen
tId))->layer(); |
| 23 return paintLayer->shouldPaintBackgroundOntoScrollingContentsLayer(); |
| 24 } |
| 25 |
20 private: | 26 private: |
21 void SetUp() override | 27 void SetUp() override |
22 { | 28 { |
23 RenderingTest::SetUp(); | 29 RenderingTest::SetUp(); |
24 enableCompositing(); | 30 enableCompositing(); |
25 } | 31 } |
26 | 32 |
27 void TearDown() override | 33 void TearDown() override |
28 { | 34 { |
29 RenderingTest::TearDown(); | 35 RenderingTest::TearDown(); |
30 } | 36 } |
31 }; | 37 }; |
32 | 38 |
33 } | 39 } |
OLD | NEW |