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

Side by Side Diff: Source/core/page/PrintContextTest.cpp

Issue 467943005: Allow passing mock FrameLoaderClient to DummyPageHolder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « Source/core/loader/EmptyClients.h ('k') | Source/core/rendering/RenderingTestHelper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/page/PrintContext.h" 6 #include "core/page/PrintContext.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/html/HTMLElement.h"
9 #include "core/testing/DummyPageHolder.h" 10 #include "core/testing/DummyPageHolder.h"
10 #include "platform/graphics/GraphicsContext.h" 11 #include "platform/graphics/GraphicsContext.h"
11 #include "platform/testing/SkiaForCoreTesting.h" 12 #include "platform/testing/SkiaForCoreTesting.h"
12 #include "platform/text/TextStream.h" 13 #include "platform/text/TextStream.h"
13 #include <gtest/gtest.h> 14 #include <gtest/gtest.h>
14 15
15 namespace blink { 16 namespace blink {
16 17
17 const int kPageWidth = 800; 18 const int kPageWidth = 800;
18 const int kPageHeight = 600; 19 const int kPageHeight = 600;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 size_t firstIndex = operations[0].rect.x() == 50 ? 0 : 1; 150 size_t firstIndex = operations[0].rect.x() == 50 ? 0 : 1;
150 EXPECT_EQ(MockCanvas::DrawRect, operations[firstIndex].type); 151 EXPECT_EQ(MockCanvas::DrawRect, operations[firstIndex].type);
151 EXPECT_SKRECT_EQ(50, 60, 70, 80, operations[firstIndex].rect); 152 EXPECT_SKRECT_EQ(50, 60, 70, 80, operations[firstIndex].rect);
152 153
153 size_t secondIndex = firstIndex == 0 ? 1 : 0; 154 size_t secondIndex = firstIndex == 0 ? 1 : 0;
154 EXPECT_EQ(MockCanvas::DrawPoint, operations[secondIndex].type); 155 EXPECT_EQ(MockCanvas::DrawPoint, operations[secondIndex].type);
155 EXPECT_SKRECT_EQ(250, 260, 0, 0, operations[secondIndex].rect); 156 EXPECT_SKRECT_EQ(250, 260, 0, 0, operations[secondIndex].rect);
156 } 157 }
157 158
158 } // namespace blink 159 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/EmptyClients.h ('k') | Source/core/rendering/RenderingTestHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698