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

Side by Side Diff: third_party/WebKit/Source/core/page/PrintContextTest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/page/PrintContext.h" 5 #include "core/page/PrintContext.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 private: 139 private:
140 std::unique_ptr<DummyPageHolder> m_pageHolder; 140 std::unique_ptr<DummyPageHolder> m_pageHolder;
141 Persistent<MockPrintContext> m_printContext; 141 Persistent<MockPrintContext> m_printContext;
142 }; 142 };
143 143
144 class PrintContextFrameTest : public PrintContextTest { 144 class PrintContextFrameTest : public PrintContextTest {
145 public: 145 public:
146 PrintContextFrameTest() 146 PrintContextFrameTest()
147 : PrintContextTest(SingleChildFrameLoaderClient::create()) {} 147 : PrintContextTest(SingleChildLocalFrameClient::create()) {}
148 }; 148 };
149 149
150 #define EXPECT_SKRECT_EQ(expectedX, expectedY, expectedWidth, expectedHeight, \ 150 #define EXPECT_SKRECT_EQ(expectedX, expectedY, expectedWidth, expectedHeight, \
151 actualRect) \ 151 actualRect) \
152 EXPECT_EQ(expectedX, actualRect.x()); \ 152 EXPECT_EQ(expectedX, actualRect.x()); \
153 EXPECT_EQ(expectedY, actualRect.y()); \ 153 EXPECT_EQ(expectedY, actualRect.y()); \
154 EXPECT_EQ(expectedWidth, actualRect.width()); \ 154 EXPECT_EQ(expectedWidth, actualRect.width()); \
155 EXPECT_EQ(expectedHeight, actualRect.height()); 155 EXPECT_EQ(expectedHeight, actualRect.height());
156 156
157 TEST_F(PrintContextTest, LinkTarget) { 157 TEST_F(PrintContextTest, LinkTarget) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 EXPECT_EQ(MockCanvas::DrawRect, operations[0].type); 351 EXPECT_EQ(MockCanvas::DrawRect, operations[0].type);
352 EXPECT_SKRECT_EQ(50, 60, 70, 80, 352 EXPECT_SKRECT_EQ(50, 60, 70, 80,
353 operations[0].rect); // FIXME: the rect should be clipped. 353 operations[0].rect); // FIXME: the rect should be clipped.
354 EXPECT_EQ(MockCanvas::DrawRect, operations[1].type); 354 EXPECT_EQ(MockCanvas::DrawRect, operations[1].type);
355 EXPECT_SKRECT_EQ(150, 160, 170, 180, operations[1].rect); 355 EXPECT_SKRECT_EQ(150, 160, 170, 180, operations[1].rect);
356 EXPECT_EQ(MockCanvas::DrawRect, operations[2].type); 356 EXPECT_EQ(MockCanvas::DrawRect, operations[2].type);
357 EXPECT_SKRECT_EQ(250, 260, 270, 280, operations[2].rect); 357 EXPECT_SKRECT_EQ(250, 260, 270, 280, operations[2].rect);
358 } 358 }
359 359
360 } // namespace blink 360 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698