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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp

Issue 2807923002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics (Closed)
Patch Set: fix typo Created 3 years, 8 months 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 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 "platform/graphics/paint/PaintController.h" 5 #include "platform/graphics/paint/PaintController.h"
6 6
7 #include "platform/RuntimeEnabledFeatures.h" 7 #include "platform/RuntimeEnabledFeatures.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "platform/graphics/paint/ClipPathDisplayItem.h" 9 #include "platform/graphics/paint/ClipPathDisplayItem.h"
10 #include "platform/graphics/paint/ClipPathRecorder.h" 10 #include "platform/graphics/paint/ClipPathRecorder.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 static_cast<DisplayItem::Type>(DisplayItem::kDrawingPaintPhaseFirst + 4); 59 static_cast<DisplayItem::Type>(DisplayItem::kDrawingPaintPhaseFirst + 4);
60 const DisplayItem::Type kBackgroundDrawingType = 60 const DisplayItem::Type kBackgroundDrawingType =
61 DisplayItem::kDrawingPaintPhaseFirst; 61 DisplayItem::kDrawingPaintPhaseFirst;
62 const DisplayItem::Type kClipType = DisplayItem::kClipFirst; 62 const DisplayItem::Type kClipType = DisplayItem::kClipFirst;
63 63
64 class TestDisplayItem final : public DisplayItem { 64 class TestDisplayItem final : public DisplayItem {
65 public: 65 public:
66 TestDisplayItem(const FakeDisplayItemClient& client, Type type) 66 TestDisplayItem(const FakeDisplayItemClient& client, Type type)
67 : DisplayItem(client, type, sizeof(*this)) {} 67 : DisplayItem(client, type, sizeof(*this)) {}
68 68
69 void Replay(GraphicsContext&) const final { ASSERT_NOT_REACHED(); } 69 void Replay(GraphicsContext&) const final { NOTREACHED(); }
70 void AppendToWebDisplayItemList(const IntRect&, 70 void AppendToWebDisplayItemList(const IntRect&,
71 WebDisplayItemList*) const final { 71 WebDisplayItemList*) const final {
72 ASSERT_NOT_REACHED(); 72 NOTREACHED();
73 } 73 }
74 }; 74 };
75 75
76 #ifndef NDEBUG 76 #ifndef NDEBUG
77 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ 77 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \
78 String trace = String::Format("%d: ", (int)i) + \ 78 String trace = String::Format("%d: ", (int)i) + \
79 "Expected: " + (expected).AsDebugString() + \ 79 "Expected: " + (expected).AsDebugString() + \
80 " Actual: " + (actual).AsDebugString(); \ 80 " Actual: " + (actual).AsDebugString(); \
81 SCOPED_TRACE(trace.Utf8().Data()); 81 SCOPED_TRACE(trace.Utf8().Data());
82 #else 82 #else
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 } 2360 }
2361 2361
2362 TEST_F(PaintControllerUnderInvalidationTest, 2362 TEST_F(PaintControllerUnderInvalidationTest,
2363 FoldCompositingDrawingInSubsequence) { 2363 FoldCompositingDrawingInSubsequence) {
2364 TestFoldCompositingDrawingInSubsequence(); 2364 TestFoldCompositingDrawingInSubsequence();
2365 } 2365 }
2366 2366
2367 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID) 2367 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID)
2368 2368
2369 } // namespace blink 2369 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698