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

Unified Diff: Source/platform/graphics/GraphicsContextTest.cpp

Issue 562543004: Check If ImageBuffer is allocated before proceeding. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/GraphicsContextTest.cpp
diff --git a/Source/platform/graphics/GraphicsContextTest.cpp b/Source/platform/graphics/GraphicsContextTest.cpp
index 3672c36bdec4e4fec1f806b988eaa5a4248756d9..f862cf2b5c5df7e1cce618ce47dd423e616352fb 100644
--- a/Source/platform/graphics/GraphicsContextTest.cpp
+++ b/Source/platform/graphics/GraphicsContextTest.cpp
@@ -243,6 +243,7 @@ TEST(GraphicsContextTest, trackImageMask)
context.beginTransparencyLayer(1);
OwnPtr<ImageBuffer> alphaImage = ImageBuffer::create(IntSize(100, 100));
+ EXPECT_FALSE(!alphaImage);
alphaImage->context()->fillRect(IntRect(0, 0, 100, 100), alpha);
context.setCompositeOperation(CompositeSourceOver);
@@ -280,6 +281,7 @@ TEST(GraphicsContextTest, trackImageMaskWithOpaqueRect)
context.beginTransparencyLayer(1);
OwnPtr<ImageBuffer> alphaImage = ImageBuffer::create(IntSize(100, 100));
+ EXPECT_FALSE(!alphaImage);
alphaImage->context()->fillRect(IntRect(0, 0, 100, 100), alpha);
context.setCompositeOperation(CompositeSourceOver);

Powered by Google App Engine
This is Rietveld 408576698