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

Side by Side Diff: third_party/WebKit/Source/core/layout/VisualRectMappingTest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/layout/LayoutTestHelper.h" 5 #include "core/layout/LayoutTestHelper.h"
6 #include "core/layout/LayoutView.h" 6 #include "core/layout/LayoutView.h"
7 #include "core/layout/PaintInvalidationState.h" 7 #include "core/layout/PaintInvalidationState.h"
8 #include "core/paint/PaintLayer.h" 8 #include "core/paint/PaintLayer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class VisualRectMappingTest : public RenderingTest { 13 class VisualRectMappingTest : public RenderingTest {
14 public: 14 public:
15 VisualRectMappingTest() 15 VisualRectMappingTest()
16 : RenderingTest(SingleChildFrameLoaderClient::create()) {} 16 : RenderingTest(SingleChildLocalFrameClient::create()) {}
17 17
18 protected: 18 protected:
19 LayoutView& layoutView() const { return *document().layoutView(); } 19 LayoutView& layoutView() const { return *document().layoutView(); }
20 20
21 void checkPaintInvalidationVisualRect(const LayoutObject& object) { 21 void checkPaintInvalidationVisualRect(const LayoutObject& object) {
22 LayoutRect rect = object.localVisualRect(); 22 LayoutRect rect = object.localVisualRect();
23 if (object.isBox()) 23 if (object.isBox())
24 toLayoutBox(object).flipForWritingMode(rect); 24 toLayoutBox(object).flipForWritingMode(rect);
25 const LayoutBoxModelObject& paintInvalidationContainer = 25 const LayoutBoxModelObject& paintInvalidationContainer =
26 object.containerForPaintInvalidation(); 26 object.containerForPaintInvalidation();
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 EXPECT_TRUE(target->mapToVisualRectInAncestorSpace(&layoutView(), rect)); 694 EXPECT_TRUE(target->mapToVisualRectInAncestorSpace(&layoutView(), rect));
695 EXPECT_EQ(LayoutRect(66, 55, 33, 44), rect); 695 EXPECT_EQ(LayoutRect(66, 55, 33, 44), rect);
696 EXPECT_EQ(rect, target->visualRect()); 696 EXPECT_EQ(rect, target->visualRect());
697 697
698 rect = targetVisualRect; 698 rect = targetVisualRect;
699 EXPECT_TRUE(target->mapToVisualRectInAncestorSpace(span, rect)); 699 EXPECT_TRUE(target->mapToVisualRectInAncestorSpace(span, rect));
700 EXPECT_EQ(LayoutRect(-200, -100, 33, 44), rect); 700 EXPECT_EQ(LayoutRect(-200, -100, 33, 44), rect);
701 } 701 }
702 702
703 } // namespace blink 703 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698