Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Issue 2719813002: Rename classes that derived from EmptyLocalFrameClient. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/paint/PaintLayer.h" 5 #include "core/paint/PaintLayer.h"
6 6
7 #include "core/html/HTMLIFrameElement.h" 7 #include "core/html/HTMLIFrameElement.h"
8 #include "core/layout/LayoutBoxModelObject.h" 8 #include "core/layout/LayoutBoxModelObject.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
11 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" 11 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
12 #include "platform/testing/UnitTestHelpers.h" 12 #include "platform/testing/UnitTestHelpers.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 typedef std::pair<bool, bool> SlimmingPaintAndRootLayerScrolling; 16 typedef std::pair<bool, bool> SlimmingPaintAndRootLayerScrolling;
17 class PaintLayerTest 17 class PaintLayerTest
18 : public ::testing::WithParamInterface<SlimmingPaintAndRootLayerScrolling>, 18 : public ::testing::WithParamInterface<SlimmingPaintAndRootLayerScrolling>,
19 private ScopedSlimmingPaintV2ForTest, 19 private ScopedSlimmingPaintV2ForTest,
20 private ScopedRootLayerScrollingForTest, 20 private ScopedRootLayerScrollingForTest,
21 public RenderingTest { 21 public RenderingTest {
22 public: 22 public:
23 PaintLayerTest() 23 PaintLayerTest()
24 : ScopedSlimmingPaintV2ForTest(GetParam().first), 24 : ScopedSlimmingPaintV2ForTest(GetParam().first),
25 ScopedRootLayerScrollingForTest(GetParam().second), 25 ScopedRootLayerScrollingForTest(GetParam().second),
26 RenderingTest(SingleChildFrameLoaderClient::create()) {} 26 RenderingTest(SingleChildLocalFrameClient::create()) {}
27 }; 27 };
28 28
29 SlimmingPaintAndRootLayerScrolling foo[] = { 29 SlimmingPaintAndRootLayerScrolling foo[] = {
30 SlimmingPaintAndRootLayerScrolling(false, false), 30 SlimmingPaintAndRootLayerScrolling(false, false),
31 SlimmingPaintAndRootLayerScrolling(true, false), 31 SlimmingPaintAndRootLayerScrolling(true, false),
32 SlimmingPaintAndRootLayerScrolling(false, true), 32 SlimmingPaintAndRootLayerScrolling(false, true),
33 SlimmingPaintAndRootLayerScrolling(true, true)}; 33 SlimmingPaintAndRootLayerScrolling(true, true)};
34 34
35 INSTANTIATE_TEST_CASE_P(All, PaintLayerTest, ::testing::ValuesIn(foo)); 35 INSTANTIATE_TEST_CASE_P(All, PaintLayerTest, ::testing::ValuesIn(foo));
36 36
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 EXPECT_EQ(LayoutPoint(-150, 50), spanner->location()); 715 EXPECT_EQ(LayoutPoint(-150, 50), spanner->location());
716 EXPECT_EQ(LayoutPoint(100, 100), extraLayer->location()); 716 EXPECT_EQ(LayoutPoint(100, 100), extraLayer->location());
717 // -60 = 2nd-column-x(40) - scroll-offset-x(200) + x-location(100) 717 // -60 = 2nd-column-x(40) - scroll-offset-x(200) + x-location(100)
718 // 20 = y-location(100) - column-height(80) 718 // 20 = y-location(100) - column-height(80)
719 EXPECT_EQ(LayoutPoint(-60, 20), 719 EXPECT_EQ(LayoutPoint(-60, 20),
720 extraLayer->visualOffsetFromAncestor(columns)); 720 extraLayer->visualOffsetFromAncestor(columns));
721 EXPECT_EQ(LayoutPoint(-150, 50), spanner->visualOffsetFromAncestor(columns)); 721 EXPECT_EQ(LayoutPoint(-150, 50), spanner->visualOffsetFromAncestor(columns));
722 } 722 }
723 723
724 } // namespace blink 724 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698