| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 PaintControllerPaintTestForSlimmingPaintV2() : PaintControllerPaintTestBase(
true) { } | 91 PaintControllerPaintTestForSlimmingPaintV2() : PaintControllerPaintTestBase(
true) { } |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 class PaintControllerPaintTestForSlimmingPaintV1AndV2 | 94 class PaintControllerPaintTestForSlimmingPaintV1AndV2 |
| 95 : public PaintControllerPaintTestBase | 95 : public PaintControllerPaintTestBase |
| 96 , public testing::WithParamInterface<bool> { | 96 , public testing::WithParamInterface<bool> { |
| 97 public: | 97 public: |
| 98 PaintControllerPaintTestForSlimmingPaintV1AndV2() : PaintControllerPaintTest
Base(GetParam()) { } | 98 PaintControllerPaintTestForSlimmingPaintV1AndV2() : PaintControllerPaintTest
Base(GetParam()) { } |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 class TestDisplayItem final : public DisplayItem { | 101 class TestDisplayItem final : public DisplayItemBase<TestDisplayItem> { |
| 102 public: | 102 public: |
| 103 TestDisplayItem(const DisplayItemClient& client, Type type) : DisplayItem(cl
ient, type, sizeof(*this)) { } | 103 TestDisplayItem(const DisplayItemClient& client, Type type) : DisplayItemBas
e(client, type) { } |
| 104 | 104 |
| 105 void replay(GraphicsContext&) const final { ASSERT_NOT_REACHED(); } | 105 void replay(GraphicsContext&) const final { ASSERT_NOT_REACHED(); } |
| 106 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal { ASSERT_NOT_REACHED(); } | 106 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal { ASSERT_NOT_REACHED(); } |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 #ifndef NDEBUG | 109 #ifndef NDEBUG |
| 110 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ | 110 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ |
| 111 String trace = String::format("%d: ", (int)i) + "Expected: " + (expected).as
DebugString() + " Actual: " + (actual).asDebugString(); \ | 111 String trace = String::format("%d: ", (int)i) + "Expected: " + (expected).as
DebugString() + " Actual: " + (actual).asDebugString(); \ |
| 112 SCOPED_TRACE(trace.utf8().data()); | 112 SCOPED_TRACE(trace.utf8().data()); |
| 113 #else | 113 #else |
| (...skipping 17 matching lines...) Expand all Loading... |
| 131 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground; | 131 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground; |
| 132 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD
rawingType(backgroundType); | 132 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD
rawingType(backgroundType); |
| 133 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa
intPhaseForeground); | 133 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa
intPhaseForeground); |
| 134 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD
rawingType(foregroundType); | 134 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD
rawingType(foregroundType); |
| 135 const DisplayItem::Type documentBackgroundType = DisplayItem::DocumentBackground
; | 135 const DisplayItem::Type documentBackgroundType = DisplayItem::DocumentBackground
; |
| 136 const DisplayItem::Type cachedDocumentBackgroundType = DisplayItem::drawingTypeT
oCachedDrawingType(DisplayItem::DocumentBackground); | 136 const DisplayItem::Type cachedDocumentBackgroundType = DisplayItem::drawingTypeT
oCachedDrawingType(DisplayItem::DocumentBackground); |
| 137 | 137 |
| 138 } // namespace blink | 138 } // namespace blink |
| 139 | 139 |
| 140 #endif // PaintControllerPaintTest_h | 140 #endif // PaintControllerPaintTest_h |
| OLD | NEW |