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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h

Issue 1497873002: Make DisplayItemClient an interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/LayoutObjectDrawingRecorder.h ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698