OLD | NEW |
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 Loading... |
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 |
OLD | NEW |