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

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

Issue 2804883006: Revert of Remove begin/end subseq. display items, and store on PaintController instead. (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
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 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 FloatRect(100, 200, 100, 100)); 1076 FloatRect(100, 200, 100, 100));
1077 drawRect(context, content2, backgroundDrawingType, 1077 drawRect(context, content2, backgroundDrawingType,
1078 FloatRect(100, 200, 50, 200)); 1078 FloatRect(100, 200, 50, 200));
1079 drawRect(context, content2, foregroundDrawingType, 1079 drawRect(context, content2, foregroundDrawingType,
1080 FloatRect(100, 200, 50, 200)); 1080 FloatRect(100, 200, 50, 200));
1081 drawRect(context, container2, foregroundDrawingType, 1081 drawRect(context, container2, foregroundDrawingType,
1082 FloatRect(100, 200, 100, 100)); 1082 FloatRect(100, 200, 100, 100));
1083 } 1083 }
1084 getPaintController().commitNewDisplayItems(); 1084 getPaintController().commitNewDisplayItems();
1085 1085
1086 EXPECT_DISPLAY_LIST(getPaintController().getDisplayItemList(), 8, 1086 EXPECT_DISPLAY_LIST(
1087 TestDisplayItem(container1, backgroundDrawingType), 1087 getPaintController().getDisplayItemList(), 12,
1088 TestDisplayItem(content1, backgroundDrawingType), 1088 TestDisplayItem(container1, DisplayItem::kSubsequence),
1089 TestDisplayItem(content1, foregroundDrawingType), 1089 TestDisplayItem(container1, backgroundDrawingType),
1090 TestDisplayItem(container1, foregroundDrawingType), 1090 TestDisplayItem(content1, backgroundDrawingType),
1091 TestDisplayItem(content1, foregroundDrawingType),
1092 TestDisplayItem(container1, foregroundDrawingType),
1093 TestDisplayItem(container1, DisplayItem::kEndSubsequence),
1091 1094
1092 TestDisplayItem(container2, backgroundDrawingType), 1095 TestDisplayItem(container2, DisplayItem::kSubsequence),
1093 TestDisplayItem(content2, backgroundDrawingType), 1096 TestDisplayItem(container2, backgroundDrawingType),
1094 TestDisplayItem(content2, foregroundDrawingType), 1097 TestDisplayItem(content2, backgroundDrawingType),
1095 TestDisplayItem(container2, foregroundDrawingType)); 1098 TestDisplayItem(content2, foregroundDrawingType),
1096 1099 TestDisplayItem(container2, foregroundDrawingType),
1097 PaintController::SubsequenceMarkers* markers = 1100 TestDisplayItem(container2, DisplayItem::kEndSubsequence));
1098 getPaintController().getSubsequenceMarkers(container1);
1099 CHECK(markers);
1100 EXPECT_EQ(0u, markers->start);
1101 EXPECT_EQ(3u, markers->end);
1102
1103 markers = getPaintController().getSubsequenceMarkers(container2);
1104 CHECK(markers);
1105 EXPECT_EQ(4u, markers->start);
1106 EXPECT_EQ(7u, markers->end);
1107 1101
1108 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 1102 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
1109 EXPECT_EQ(2u, getPaintController().paintChunks().size()); 1103 EXPECT_EQ(2u, getPaintController().paintChunks().size());
1110 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType), 1104 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType),
1111 getPaintController().paintChunks()[0].id); 1105 getPaintController().paintChunks()[0].id);
1112 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), 1106 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType),
1113 getPaintController().paintChunks()[1].id); 1107 getPaintController().paintChunks()[1].id);
1114 EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, 1108 EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects,
1115 UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect()))); 1109 UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
1116 EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, 1110 EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 drawRect(context, container1, foregroundDrawingType, 1153 drawRect(context, container1, foregroundDrawingType,
1160 FloatRect(100, 100, 100, 100)); 1154 FloatRect(100, 100, 100, 100));
1161 } 1155 }
1162 } else { 1156 } else {
1163 EXPECT_TRUE(SubsequenceRecorder::useCachedSubsequenceIfPossible( 1157 EXPECT_TRUE(SubsequenceRecorder::useCachedSubsequenceIfPossible(
1164 context, container2)); 1158 context, container2));
1165 EXPECT_TRUE(SubsequenceRecorder::useCachedSubsequenceIfPossible( 1159 EXPECT_TRUE(SubsequenceRecorder::useCachedSubsequenceIfPossible(
1166 context, container1)); 1160 context, container1));
1167 } 1161 }
1168 1162
1169 EXPECT_EQ(8, numCachedNewItems()); 1163 EXPECT_EQ(12, numCachedNewItems());
1170 #ifndef NDEBUG 1164 #ifndef NDEBUG
1171 EXPECT_EQ(0, numSequentialMatches()); 1165 EXPECT_EQ(1, numSequentialMatches());
1172 EXPECT_EQ(0, numOutOfOrderMatches()); 1166 EXPECT_EQ(1, numOutOfOrderMatches());
1173 EXPECT_EQ(0, numIndexedItems()); 1167 EXPECT_EQ(5, numIndexedItems());
1174 #endif 1168 #endif
1175 1169
1176 getPaintController().commitNewDisplayItems(); 1170 getPaintController().commitNewDisplayItems();
1177 1171
1178 EXPECT_DISPLAY_LIST(getPaintController().getDisplayItemList(), 8, 1172 EXPECT_DISPLAY_LIST(
1179 TestDisplayItem(container2, backgroundDrawingType), 1173 getPaintController().getDisplayItemList(), 12,
1180 TestDisplayItem(content2, backgroundDrawingType), 1174 TestDisplayItem(container2, DisplayItem::kSubsequence),
1181 TestDisplayItem(content2, foregroundDrawingType), 1175 TestDisplayItem(container2, backgroundDrawingType),
1182 TestDisplayItem(container2, foregroundDrawingType), 1176 TestDisplayItem(content2, backgroundDrawingType),
1183 TestDisplayItem(container1, backgroundDrawingType), 1177 TestDisplayItem(content2, foregroundDrawingType),
1184 TestDisplayItem(content1, backgroundDrawingType), 1178 TestDisplayItem(container2, foregroundDrawingType),
1185 TestDisplayItem(content1, foregroundDrawingType), 1179 TestDisplayItem(container2, DisplayItem::kEndSubsequence),
1186 TestDisplayItem(container1, foregroundDrawingType));
1187 1180
1188 markers = getPaintController().getSubsequenceMarkers(container2); 1181 TestDisplayItem(container1, DisplayItem::kSubsequence),
1189 CHECK(markers); 1182 TestDisplayItem(container1, backgroundDrawingType),
1190 EXPECT_EQ(0u, markers->start); 1183 TestDisplayItem(content1, backgroundDrawingType),
1191 EXPECT_EQ(3u, markers->end); 1184 TestDisplayItem(content1, foregroundDrawingType),
1192 1185 TestDisplayItem(container1, foregroundDrawingType),
1193 markers = getPaintController().getSubsequenceMarkers(container1); 1186 TestDisplayItem(container1, DisplayItem::kEndSubsequence));
1194 CHECK(markers);
1195 EXPECT_EQ(4u, markers->start);
1196 EXPECT_EQ(7u, markers->end);
1197 1187
1198 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 1188 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
1199 DisplayItemClient::endShouldKeepAliveAllClients(); 1189 DisplayItemClient::endShouldKeepAliveAllClients();
1200 #endif 1190 #endif
1201 1191
1202 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 1192 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
1203 EXPECT_EQ(2u, getPaintController().paintChunks().size()); 1193 EXPECT_EQ(2u, getPaintController().paintChunks().size());
1204 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), 1194 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType),
1205 getPaintController().paintChunks()[0].id); 1195 getPaintController().paintChunks()[0].id);
1206 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType), 1196 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType),
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 getPaintController().updateCurrentPaintChunkProperties( 1419 getPaintController().updateCurrentPaintChunkProperties(
1430 &id, content2Properties); 1420 &id, content2Properties);
1431 } 1421 }
1432 SubsequenceRecorder r(context, content2); 1422 SubsequenceRecorder r(context, content2);
1433 drawRect(context, content2, backgroundDrawingType, 1423 drawRect(context, content2, backgroundDrawingType,
1434 FloatRect(100, 200, 50, 200)); 1424 FloatRect(100, 200, 50, 200));
1435 } 1425 }
1436 } 1426 }
1437 getPaintController().commitNewDisplayItems(); 1427 getPaintController().commitNewDisplayItems();
1438 1428
1439 EXPECT_DISPLAY_LIST(getPaintController().getDisplayItemList(), 6, 1429 EXPECT_DISPLAY_LIST(
1440 TestDisplayItem(container1, backgroundDrawingType), 1430 getPaintController().getDisplayItemList(), 14,
1441 TestDisplayItem(content1, backgroundDrawingType), 1431 TestDisplayItem(container1, DisplayItem::kSubsequence),
1442 TestDisplayItem(content1, foregroundDrawingType), 1432 TestDisplayItem(container1, backgroundDrawingType),
1443 TestDisplayItem(container1, foregroundDrawingType), 1433 TestDisplayItem(content1, DisplayItem::kSubsequence),
1444 TestDisplayItem(container2, backgroundDrawingType), 1434 TestDisplayItem(content1, backgroundDrawingType),
1445 TestDisplayItem(content2, backgroundDrawingType)); 1435 TestDisplayItem(content1, foregroundDrawingType),
1436 TestDisplayItem(content1, DisplayItem::kEndSubsequence),
1437 TestDisplayItem(container1, foregroundDrawingType),
1438 TestDisplayItem(container1, DisplayItem::kEndSubsequence),
1446 1439
1447 PaintController::SubsequenceMarkers* markers = 1440 TestDisplayItem(container2, DisplayItem::kSubsequence),
1448 getPaintController().getSubsequenceMarkers(container1); 1441 TestDisplayItem(container2, backgroundDrawingType),
1449 CHECK(markers); 1442 TestDisplayItem(content2, DisplayItem::kSubsequence),
1450 EXPECT_EQ(0u, markers->start); 1443 TestDisplayItem(content2, backgroundDrawingType),
1451 EXPECT_EQ(3u, markers->end); 1444 TestDisplayItem(content2, DisplayItem::kEndSubsequence),
1452 1445 TestDisplayItem(container2, DisplayItem::kEndSubsequence));
1453 markers = getPaintController().getSubsequenceMarkers(content1);
1454 CHECK(markers);
1455 EXPECT_EQ(1u, markers->start);
1456 EXPECT_EQ(2u, markers->end);
1457
1458 markers = getPaintController().getSubsequenceMarkers(container2);
1459 CHECK(markers);
1460 EXPECT_EQ(4u, markers->start);
1461 EXPECT_EQ(5u, markers->end);
1462
1463 markers = getPaintController().getSubsequenceMarkers(content2);
1464 CHECK(markers);
1465 EXPECT_EQ(5u, markers->start);
1466 EXPECT_EQ(5u, markers->end);
1467 1446
1468 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 1447 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
1469 EXPECT_EQ(5u, getPaintController().paintChunks().size()); 1448 EXPECT_EQ(5u, getPaintController().paintChunks().size());
1470 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType), 1449 EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType),
1471 getPaintController().paintChunks()[0].id); 1450 getPaintController().paintChunks()[0].id);
1472 EXPECT_EQ(PaintChunk::Id(content1, backgroundDrawingType), 1451 EXPECT_EQ(PaintChunk::Id(content1, backgroundDrawingType),
1473 getPaintController().paintChunks()[1].id); 1452 getPaintController().paintChunks()[1].id);
1474 EXPECT_EQ(PaintChunk::Id(container1, foregroundDrawingType), 1453 EXPECT_EQ(PaintChunk::Id(container1, foregroundDrawingType),
1475 getPaintController().paintChunks()[2].id); 1454 getPaintController().paintChunks()[2].id);
1476 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), 1455 EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType),
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 } 1519 }
1541 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 1520 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
1542 PaintChunk::Id id(container1, foregroundDrawingType); 1521 PaintChunk::Id id(container1, foregroundDrawingType);
1543 getPaintController().updateCurrentPaintChunkProperties( 1522 getPaintController().updateCurrentPaintChunkProperties(
1544 &id, container1ForegroundProperties); 1523 &id, container1ForegroundProperties);
1545 } 1524 }
1546 drawRect(context, container1, foregroundDrawingType, 1525 drawRect(context, container1, foregroundDrawingType,
1547 FloatRect(100, 100, 100, 100)); 1526 FloatRect(100, 100, 100, 100));
1548 } 1527 }
1549 1528
1550 EXPECT_EQ(2, numCachedNewItems()); 1529 EXPECT_EQ(4, numCachedNewItems());
1551 #ifndef NDEBUG 1530 #ifndef NDEBUG
1552 EXPECT_EQ(0, numSequentialMatches()); 1531 EXPECT_EQ(1, numSequentialMatches());
1553 EXPECT_EQ(0, numOutOfOrderMatches()); 1532 EXPECT_EQ(0, numOutOfOrderMatches());
1554 EXPECT_EQ(0, numIndexedItems()); 1533 EXPECT_EQ(2, numIndexedItems());
1555 #endif 1534 #endif
1556 1535
1557 getPaintController().commitNewDisplayItems(); 1536 getPaintController().commitNewDisplayItems();
1558 1537
1559 EXPECT_DISPLAY_LIST(getPaintController().getDisplayItemList(), 4, 1538 EXPECT_DISPLAY_LIST(
1560 TestDisplayItem(content2, foregroundDrawingType), 1539 getPaintController().getDisplayItemList(), 10,
1561 TestDisplayItem(content1, backgroundDrawingType), 1540 TestDisplayItem(content2, DisplayItem::kSubsequence),
1562 TestDisplayItem(content1, foregroundDrawingType), 1541 TestDisplayItem(content2, foregroundDrawingType),
1563 TestDisplayItem(container1, foregroundDrawingType)); 1542 TestDisplayItem(content2, DisplayItem::kEndSubsequence),
1564 1543
1565 markers = getPaintController().getSubsequenceMarkers(content2); 1544 TestDisplayItem(container1, DisplayItem::kSubsequence),
1566 CHECK(markers); 1545 TestDisplayItem(content1, DisplayItem::kSubsequence),
1567 EXPECT_EQ(0u, markers->start); 1546 TestDisplayItem(content1, backgroundDrawingType),
1568 EXPECT_EQ(0u, markers->end); 1547 TestDisplayItem(content1, foregroundDrawingType),
1569 1548 TestDisplayItem(content1, DisplayItem::kEndSubsequence),
1570 markers = getPaintController().getSubsequenceMarkers(container1); 1549 TestDisplayItem(container1, foregroundDrawingType),
1571 CHECK(markers); 1550 TestDisplayItem(container1, DisplayItem::kEndSubsequence));
1572 EXPECT_EQ(1u, markers->start);
1573 EXPECT_EQ(3u, markers->end);
1574
1575 markers = getPaintController().getSubsequenceMarkers(content1);
1576 CHECK(markers);
1577 EXPECT_EQ(1u, markers->start);
1578 EXPECT_EQ(2u, markers->end);
1579 1551
1580 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 1552 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
1581 EXPECT_EQ(3u, getPaintController().paintChunks().size()); 1553 EXPECT_EQ(3u, getPaintController().paintChunks().size());
1582 EXPECT_EQ(PaintChunk::Id(content2, foregroundDrawingType), 1554 EXPECT_EQ(PaintChunk::Id(content2, foregroundDrawingType),
1583 getPaintController().paintChunks()[0].id); 1555 getPaintController().paintChunks()[0].id);
1584 EXPECT_EQ(PaintChunk::Id(content1, backgroundDrawingType), 1556 EXPECT_EQ(PaintChunk::Id(content1, backgroundDrawingType),
1585 getPaintController().paintChunks()[1].id); 1557 getPaintController().paintChunks()[1].id);
1586 EXPECT_EQ(PaintChunk::Id(container1, foregroundDrawingType), 1558 EXPECT_EQ(PaintChunk::Id(container1, foregroundDrawingType),
1587 getPaintController().paintChunks()[2].id); 1559 getPaintController().paintChunks()[2].id);
1588 // This is a new chunk. 1560 // This is a new chunk.
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 FakeDisplayItemClient content("content"); 2234 FakeDisplayItemClient content("content");
2263 GraphicsContext context(getPaintController()); 2235 GraphicsContext context(getPaintController());
2264 2236
2265 { 2237 {
2266 SubsequenceRecorder subsequence(context, container); 2238 SubsequenceRecorder subsequence(context, container);
2267 CompositingRecorder compositing(context, content, SkBlendMode::kSrc, 0.5); 2239 CompositingRecorder compositing(context, content, SkBlendMode::kSrc, 0.5);
2268 drawRect(context, content, backgroundDrawingType, 2240 drawRect(context, content, backgroundDrawingType,
2269 FloatRect(100, 100, 300, 300)); 2241 FloatRect(100, 100, 300, 300));
2270 } 2242 }
2271 getPaintController().commitNewDisplayItems(); 2243 getPaintController().commitNewDisplayItems();
2272 EXPECT_EQ(1u, 2244 EXPECT_EQ(3u,
2273 getPaintController().paintArtifact().getDisplayItemList().size()); 2245 getPaintController().paintArtifact().getDisplayItemList().size());
2274 2246
2275 { 2247 {
2276 EXPECT_FALSE(SubsequenceRecorder::useCachedSubsequenceIfPossible( 2248 EXPECT_FALSE(SubsequenceRecorder::useCachedSubsequenceIfPossible(
2277 context, container)); 2249 context, container));
2278 SubsequenceRecorder subsequence(context, container); 2250 SubsequenceRecorder subsequence(context, container);
2279 CompositingRecorder compositing(context, content, SkBlendMode::kSrc, 0.5); 2251 CompositingRecorder compositing(context, content, SkBlendMode::kSrc, 0.5);
2280 drawRect(context, content, backgroundDrawingType, 2252 drawRect(context, content, backgroundDrawingType,
2281 FloatRect(100, 100, 300, 300)); 2253 FloatRect(100, 100, 300, 300));
2282 } 2254 }
2283 getPaintController().commitNewDisplayItems(); 2255 getPaintController().commitNewDisplayItems();
2284 EXPECT_EQ(1u, 2256 EXPECT_EQ(3u,
2285 getPaintController().paintArtifact().getDisplayItemList().size()); 2257 getPaintController().paintArtifact().getDisplayItemList().size());
2286 2258
2287 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 2259 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
2288 DisplayItemClient::endShouldKeepAliveAllClients(); 2260 DisplayItemClient::endShouldKeepAliveAllClients();
2289 #endif 2261 #endif
2290 } 2262 }
2291 }; 2263 };
2292 2264
2293 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawing) { 2265 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawing) {
2294 EXPECT_DEATH(testChangeDrawing(), "under-invalidation: display item changed"); 2266 EXPECT_DEATH(testChangeDrawing(), "under-invalidation: display item changed");
(...skipping 17 matching lines...) Expand all
2312 } 2284 }
2313 2285
2314 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawingInSubsequence) { 2286 TEST_F(PaintControllerUnderInvalidationTest, ChangeDrawingInSubsequence) {
2315 EXPECT_DEATH(testChangeDrawingInSubsequence(), 2287 EXPECT_DEATH(testChangeDrawingInSubsequence(),
2316 "\"\\(In cached subsequence of first\\)\" under-invalidation: " 2288 "\"\\(In cached subsequence of first\\)\" under-invalidation: "
2317 "display item changed"); 2289 "display item changed");
2318 } 2290 }
2319 2291
2320 TEST_F(PaintControllerUnderInvalidationTest, MoreDrawingInSubsequence) { 2292 TEST_F(PaintControllerUnderInvalidationTest, MoreDrawingInSubsequence) {
2321 EXPECT_DEATH(testMoreDrawingInSubsequence(), 2293 EXPECT_DEATH(testMoreDrawingInSubsequence(),
2322 "Check failed: false. Can't find cached display item"); 2294 "\"\\(In cached subsequence of first\\)\" under-invalidation: "
2295 "display item changed");
2323 } 2296 }
2324 2297
2325 TEST_F(PaintControllerUnderInvalidationTest, LessDrawingInSubsequence) { 2298 TEST_F(PaintControllerUnderInvalidationTest, LessDrawingInSubsequence) {
2326 // 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
2328 // test cases.
2329 EXPECT_DEATH(testLessDrawingInSubsequence(), 2299 EXPECT_DEATH(testLessDrawingInSubsequence(),
2330 "\"\\(In cached subsequence of first\\)\" under-invalidation: " 2300 "\"\\(In cached subsequence of first\\)\" under-invalidation: "
2331 "new subsequence wrong length"); 2301 "display item changed");
2332 } 2302 }
2333 2303
2334 TEST_F(PaintControllerUnderInvalidationTest, ChangeNonCacheableInSubsequence) { 2304 TEST_F(PaintControllerUnderInvalidationTest, ChangeNonCacheableInSubsequence) {
2335 EXPECT_DEATH(testChangeNonCacheableInSubsequence(), 2305 EXPECT_DEATH(testChangeNonCacheableInSubsequence(),
2336 "\"\\(In cached subsequence of container\\)\" " 2306 "\"\\(In cached subsequence of container\\)\" "
2337 "under-invalidation: display item changed"); 2307 "under-invalidation: display item changed");
2338 } 2308 }
2339 2309
2340 TEST_F(PaintControllerUnderInvalidationTest, InvalidationInSubsequence) { 2310 TEST_F(PaintControllerUnderInvalidationTest, InvalidationInSubsequence) {
2341 // We allow invalidated display item clients as long as they would produce the 2311 // We allow invalidated display item clients as long as they would produce the
2342 // same display items. The cases of changed display items are tested by other 2312 // same display items. The cases of changed display items are tested by other
2343 // test cases. 2313 // test cases.
2344 testInvalidationInSubsequence(); 2314 testInvalidationInSubsequence();
2345 } 2315 }
2346 2316
2347 TEST_F(PaintControllerUnderInvalidationTest, 2317 TEST_F(PaintControllerUnderInvalidationTest,
2348 FoldCompositingDrawingInSubsequence) { 2318 FoldCompositingDrawingInSubsequence) {
2349 testFoldCompositingDrawingInSubsequence(); 2319 testFoldCompositingDrawingInSubsequence();
2350 } 2320 }
2351 2321
2352 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID) 2322 #endif // defined(GTEST_HAS_DEATH_TEST) && !OS(ANDROID)
2353 2323
2354 } // namespace blink 2324 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698