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/LayoutBlock.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) | 20 bool canPaintBackgroundOntoScrollingContentsLayer(const char* elementId) |
21 { | 21 { |
22 PaintLayer* paintLayer = toLayoutBlock(getLayoutObjectByElementId(elemen
tId))->layer(); | 22 PaintLayer* paintLayer = toLayoutBlock(getLayoutObjectByElementId(elemen
tId))->layer(); |
23 return paintLayer->shouldPaintBackgroundOntoScrollingContentsLayer(); | 23 return paintLayer->canPaintBackgroundOntoScrollingContentsLayer(); |
24 } | 24 } |
25 | 25 |
26 private: | 26 private: |
27 void SetUp() override | 27 void SetUp() override |
28 { | 28 { |
29 RenderingTest::SetUp(); | 29 RenderingTest::SetUp(); |
30 enableCompositing(); | 30 enableCompositing(); |
31 } | 31 } |
32 | 32 |
33 void TearDown() override | 33 void TearDown() override |
34 { | 34 { |
35 RenderingTest::TearDown(); | 35 RenderingTest::TearDown(); |
36 } | 36 } |
37 }; | 37 }; |
38 | 38 |
39 } | 39 } |
OLD | NEW |