OLD | NEW |
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 #ifndef PaintControllerPaintTest_h | 5 #ifndef PaintControllerPaintTest_h |
6 #define PaintControllerPaintTest_h | 6 #define PaintControllerPaintTest_h |
7 | 7 |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.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" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 PaintControllerPaintTestForSlimmingPaintV1AndV2() | 111 PaintControllerPaintTestForSlimmingPaintV1AndV2() |
112 : PaintControllerPaintTestBase(GetParam()) {} | 112 : PaintControllerPaintTestBase(GetParam()) {} |
113 }; | 113 }; |
114 | 114 |
115 class TestDisplayItem final : public DisplayItem { | 115 class TestDisplayItem final : public DisplayItem { |
116 public: | 116 public: |
117 TestDisplayItem(const DisplayItemClient& client, Type type) | 117 TestDisplayItem(const DisplayItemClient& client, Type type) |
118 : DisplayItem(client, type, sizeof(*this)) {} | 118 : DisplayItem(client, type, sizeof(*this)) {} |
119 | 119 |
120 void Replay(GraphicsContext&) const final { NOTREACHED(); } | 120 void Replay(GraphicsContext&) const final { NOTREACHED(); } |
121 void AppendToWebDisplayItemList(const IntRect&, | 121 void AppendToWebDisplayItemList(const LayoutSize&, |
122 WebDisplayItemList*) const final { | 122 WebDisplayItemList*) const final { |
123 NOTREACHED(); | 123 NOTREACHED(); |
124 } | 124 } |
125 }; | 125 }; |
126 | 126 |
127 #ifndef NDEBUG | 127 #ifndef NDEBUG |
128 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ | 128 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ |
129 String trace = String::Format("%d: ", (int)i) + \ | 129 String trace = String::Format("%d: ", (int)i) + \ |
130 "Expected: " + (expected).AsDebugString() + \ | 130 "Expected: " + (expected).AsDebugString() + \ |
131 " Actual: " + (actual).AsDebugString(); \ | 131 " Actual: " + (actual).AsDebugString(); \ |
(...skipping 19 matching lines...) Expand all Loading... |
151 // Shorter names for frequently used display item types in tests. | 151 // Shorter names for frequently used display item types in tests. |
152 const DisplayItem::Type kBackgroundType = DisplayItem::kBoxDecorationBackground; | 152 const DisplayItem::Type kBackgroundType = DisplayItem::kBoxDecorationBackground; |
153 const DisplayItem::Type kForegroundType = | 153 const DisplayItem::Type kForegroundType = |
154 DisplayItem::PaintPhaseToDrawingType(kPaintPhaseForeground); | 154 DisplayItem::PaintPhaseToDrawingType(kPaintPhaseForeground); |
155 const DisplayItem::Type kDocumentBackgroundType = | 155 const DisplayItem::Type kDocumentBackgroundType = |
156 DisplayItem::kDocumentBackground; | 156 DisplayItem::kDocumentBackground; |
157 | 157 |
158 } // namespace blink | 158 } // namespace blink |
159 | 159 |
160 #endif // PaintControllerPaintTest_h | 160 #endif // PaintControllerPaintTest_h |
OLD | NEW |