Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp |
| index 6711ad15da7a65211c99ff837d61a37b846114b0..cf2d029b025a404fce422df84b9bfcfb3aad623c 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp |
| @@ -1924,8 +1924,7 @@ TEST_F(PaintControllerTestBase, IsSuitableForGpuRasterizationSinglePath) { |
| GraphicsContext context(GetPaintController()); |
| DrawPath(context, client, kBackgroundDrawingType, 1); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_TRUE( |
| - GetPaintController().GetPaintArtifact().IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 1); |
|
danakj
2017/05/31 18:03:38
These EXPECT_EQ's are backwards, expected first
|
| } |
| TEST_F(PaintControllerTestBase, |
| @@ -1935,8 +1934,7 @@ TEST_F(PaintControllerTestBase, |
| DrawPath(context, client, kBackgroundDrawingType, 50); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE( |
| - GetPaintController().GetPaintArtifact().IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50); |
| } |
| TEST_F(PaintControllerTestBase, |
| @@ -1950,8 +1948,7 @@ TEST_F(PaintControllerTestBase, |
| GetPaintController().EndSkippingCache(); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE( |
| - GetPaintController().GetPaintArtifact().IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50 * 50); |
| } |
| TEST_F(PaintControllerTestBase, |
| @@ -1962,9 +1959,7 @@ TEST_F(PaintControllerTestBase, |
| GraphicsContext context(GetPaintController()); |
| DrawPath(context, client, kBackgroundDrawingType, 50); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE(GetPaintController() |
| - .GetPaintArtifact() |
| - .IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50); |
| } |
| client.SetDisplayItemsUncached(); |
| @@ -1973,9 +1968,7 @@ TEST_F(PaintControllerTestBase, |
| GraphicsContext context(GetPaintController()); |
| DrawPath(context, client, kBackgroundDrawingType, 50); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE(GetPaintController() |
| - .GetPaintArtifact() |
| - .IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50); |
| } |
| } |
| @@ -1987,18 +1980,14 @@ TEST_F(PaintControllerTestBase, |
| GraphicsContext context(GetPaintController()); |
| DrawPath(context, client, kBackgroundDrawingType, 50); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE(GetPaintController() |
| - .GetPaintArtifact() |
| - .IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50); |
| } |
| { |
| GraphicsContext context(GetPaintController()); |
| DrawPath(context, client, kBackgroundDrawingType, 50); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE(GetPaintController() |
| - .GetPaintArtifact() |
| - .IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50); |
| } |
| } |
| @@ -2014,14 +2003,12 @@ TEST_F( |
| DrawPath(context, client, kBackgroundDrawingType, 50); |
| } |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE( |
| - GetPaintController().GetPaintArtifact().IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50); |
| EXPECT_TRUE( |
| SubsequenceRecorder::UseCachedSubsequenceIfPossible(context, container)); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE( |
| - GetPaintController().GetPaintArtifact().IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50); |
| #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| DisplayItemClient::EndShouldKeepAliveAllClients(); |
| @@ -2051,9 +2038,7 @@ TEST_F(PaintControllerTestBase, |
| for (int j = 0; j < 50; ++j) |
| GetPaintController().CreateAndAppend<EndClipPathDisplayItem>(client); |
| GetPaintController().CommitNewDisplayItems(LayoutSize()); |
| - EXPECT_FALSE(GetPaintController() |
| - .GetPaintArtifact() |
| - .IsSuitableForGpuRasterization()); |
| + EXPECT_EQ(GetPaintController().GetPaintArtifact().NumSlowPaths(), 50 * i); |
| } |
| } |