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

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

Issue 2823603002: Stop checking for crash strings in PaintController death tests (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 } 2269 }
2270 GetPaintController().CommitNewDisplayItems(); 2270 GetPaintController().CommitNewDisplayItems();
2271 2271
2272 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 2272 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
2273 DisplayItemClient::EndShouldKeepAliveAllClients(); 2273 DisplayItemClient::EndShouldKeepAliveAllClients();
2274 #endif 2274 #endif
2275 } 2275 }
2276 }; 2276 };
2277 2277
2278 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawing) { 2278 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawing) {
2279 EXPECT_DEATH(TestChangeDrawing(), "under-invalidation: display item changed"); 2279 EXPECT_DEATH(TestChangeDrawing(), "");
2280 } 2280 }
2281 2281
2282 TEST_F(PaintControllerUnderInvalidationTest, MoreDrawing) { 2282 TEST_F(PaintControllerUnderInvalidationTest, MoreDrawing) {
2283 EXPECT_DEATH(TestMoreDrawing(), ""); 2283 EXPECT_DEATH(TestMoreDrawing(), "");
2284 } 2284 }
2285 2285
2286 TEST_F(PaintControllerUnderInvalidationTest, LessDrawing) { 2286 TEST_F(PaintControllerUnderInvalidationTest, LessDrawing) {
2287 // We don't detect under-invalidation in this case, and PaintController can 2287 // We don't detect under-invalidation in this case, and PaintController can
2288 // also handle the case gracefully. However, less drawing at one time often 2288 // also handle the case gracefully. However, less drawing at one time often
2289 // means more-drawing at another time, so eventually we'll detect such 2289 // means more-drawing at another time, so eventually we'll detect such
2290 // under-invalidations. 2290 // under-invalidations.
2291 TestLessDrawing(); 2291 TestLessDrawing();
2292 } 2292 }
2293 2293
2294 TEST_F(PaintControllerUnderInvalidationTest, NoopPairsInSubsequence) { 2294 TEST_F(PaintControllerUnderInvalidationTest, NoopPairsInSubsequence) {
2295 // This should not die. 2295 // This should not die.
2296 TestNoopPairsInSubsequence(); 2296 TestNoopPairsInSubsequence();
2297 } 2297 }
2298 2298
2299 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawingInSubsequence) { 2299 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawingInSubsequence) {
2300 EXPECT_DEATH(TestChangeDrawingInSubsequence(), 2300 EXPECT_DEATH(TestChangeDrawingInSubsequence(), "");
2301 "\"\\(In cached subsequence of first\\)\" under-invalidation: "
2302 "display item changed");
2303 } 2301 }
2304 2302
2305 TEST_F(PaintControllerUnderInvalidationTest, MoreDrawingInSubsequence) { 2303 TEST_F(PaintControllerUnderInvalidationTest, MoreDrawingInSubsequence) {
2306 EXPECT_DEATH(TestMoreDrawingInSubsequence(), 2304 EXPECT_DEATH(TestMoreDrawingInSubsequence(), "");
2307 "Check failed: false. Can't find cached display item");
2308 } 2305 }
2309 2306
2310 TEST_F(PaintControllerUnderInvalidationTest, LessDrawingInSubsequence) { 2307 TEST_F(PaintControllerUnderInvalidationTest, LessDrawingInSubsequence) {
2311 // We allow invalidated display item clients as long as they would produce the 2308 // We allow invalidated display item clients as long as they would produce the
2312 // same display items. The cases of changed display items are tested by other 2309 // same display items. The cases of changed display items are tested by other
2313 // test cases. 2310 // test cases.
2314 EXPECT_DEATH(TestLessDrawingInSubsequence(), 2311 EXPECT_DEATH(TestLessDrawingInSubsequence(), "");
2315 "\"\\(In cached subsequence of first\\)\" under-invalidation: "
2316 "new subsequence wrong length");
2317 } 2312 }
2318 2313
2319 TEST_F(PaintControllerUnderInvalidationTest, ChangeNonCacheableInSubsequence) { 2314 TEST_F(PaintControllerUnderInvalidationTest, ChangeNonCacheableInSubsequence) {
2320 EXPECT_DEATH(TestChangeNonCacheableInSubsequence(), 2315 EXPECT_DEATH(TestChangeNonCacheableInSubsequence(), "");
2321 "\"\\(In cached subsequence of container\\)\" "
2322 "under-invalidation: display item changed");
2323 } 2316 }
2324 2317
2325 TEST_F(PaintControllerUnderInvalidationTest, InvalidationInSubsequence) { 2318 TEST_F(PaintControllerUnderInvalidationTest, InvalidationInSubsequence) {
2326 // We allow invalidated display item clients as long as they would produce the 2319 // We allow invalidated display item clients as long as they would produce the
2327 // same display items. The cases of changed display items are tested by other 2320 // same display items. The cases of changed display items are tested by other
2328 // test cases. 2321 // test cases.
2329 TestInvalidationInSubsequence(); 2322 TestInvalidationInSubsequence();
2330 } 2323 }
2331 2324
2332 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID) 2325 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID)
2333 2326
2334 } // namespace blink 2327 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698