| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 class PaintControllerPaintTestForSlimmingPaintV1AndV2 | 103 class PaintControllerPaintTestForSlimmingPaintV1AndV2 |
| 104 : public PaintControllerPaintTestBase | 104 : public PaintControllerPaintTestBase |
| 105 , public testing::WithParamInterface<bool> { | 105 , public testing::WithParamInterface<bool> { |
| 106 public: | 106 public: |
| 107 PaintControllerPaintTestForSlimmingPaintV1AndV2() : PaintControllerPaintTest
Base(GetParam()) { } | 107 PaintControllerPaintTestForSlimmingPaintV1AndV2() : PaintControllerPaintTest
Base(GetParam()) { } |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 class TestDisplayItem final : public DisplayItem { | 110 class TestDisplayItem final : public DisplayItem { |
| 111 public: | 111 public: |
| 112 TestDisplayItem(const DisplayItemClientWrapper& client, Type type) : Display
Item(client, type, sizeof(*this)) { } | 112 TestDisplayItem(const DisplayItemClient& client, Type type) : DisplayItem(cl
ient, type, sizeof(*this)) { } |
| 113 | 113 |
| 114 void replay(GraphicsContext&) const final { ASSERT_NOT_REACHED(); } | 114 void replay(GraphicsContext&) const final { ASSERT_NOT_REACHED(); } |
| 115 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal { ASSERT_NOT_REACHED(); } | 115 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal { ASSERT_NOT_REACHED(); } |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 #ifndef NDEBUG | 118 #ifndef NDEBUG |
| 119 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ | 119 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ |
| 120 String trace = String::format("%d: ", (int)i) + "Expected: " + (expected).as
DebugString() + " Actual: " + (actual).asDebugString(); \ | 120 String trace = String::format("%d: ", (int)i) + "Expected: " + (expected).as
DebugString() + " Actual: " + (actual).asDebugString(); \ |
| 121 SCOPED_TRACE(trace.utf8().data()); | 121 SCOPED_TRACE(trace.utf8().data()); |
| 122 #else | 122 #else |
| (...skipping 15 matching lines...) Expand all Loading... |
| 138 | 138 |
| 139 // Shorter names for frequently used display item types in tests. | 139 // Shorter names for frequently used display item types in tests. |
| 140 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground; | 140 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground; |
| 141 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD
rawingType(backgroundType); | 141 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD
rawingType(backgroundType); |
| 142 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa
intPhaseForeground); | 142 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa
intPhaseForeground); |
| 143 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD
rawingType(foregroundType); | 143 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD
rawingType(foregroundType); |
| 144 | 144 |
| 145 } // namespace blink | 145 } // namespace blink |
| 146 | 146 |
| 147 #endif // PaintControllerPaintTest_h | 147 #endif // PaintControllerPaintTest_h |
| OLD | NEW |