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

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

Issue 540033002: use tryAllocPixels to check the result, allocPixels to require success (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
« no previous file with comments | « Source/platform/DragImageTest.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/DeferredImageDecoderTest.cpp
diff --git a/Source/platform/graphics/DeferredImageDecoderTest.cpp b/Source/platform/graphics/DeferredImageDecoderTest.cpp
index 72c16037d4e810dfff62667db9e8504337b8e1ad..69d2caf85b8bc2fbe43d794eaacf1b6ed6a28946 100644
--- a/Source/platform/graphics/DeferredImageDecoderTest.cpp
+++ b/Source/platform/graphics/DeferredImageDecoderTest.cpp
@@ -166,7 +166,7 @@ TEST_F(DeferredImageDecoderTest, drawIntoSkPicture)
EXPECT_EQ(0, m_frameBufferRequestCount);
SkBitmap canvasBitmap;
- ASSERT_TRUE(canvasBitmap.allocN32Pixels(100, 100));
+ canvasBitmap.allocN32Pixels(100, 100);
ASSERT_TRUE(m_canvas->readPixels(&canvasBitmap, 0, 0));
SkAutoLockPixels autoLock(canvasBitmap);
EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0));
@@ -194,7 +194,7 @@ TEST_F(DeferredImageDecoderTest, drawIntoSkPictureProgressive)
m_canvas->drawPicture(picture.get());
SkBitmap canvasBitmap;
- ASSERT_TRUE(canvasBitmap.allocN32Pixels(100, 100));
+ canvasBitmap.allocN32Pixels(100, 100);
ASSERT_TRUE(m_canvas->readPixels(&canvasBitmap, 0, 0));
SkAutoLockPixels autoLock(canvasBitmap);
EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0));
@@ -227,7 +227,7 @@ TEST_F(DeferredImageDecoderTest, decodeOnOtherThread)
EXPECT_EQ(0, m_frameBufferRequestCount);
SkBitmap canvasBitmap;
- ASSERT_TRUE(canvasBitmap.allocN32Pixels(100, 100));
+ canvasBitmap.allocN32Pixels(100, 100);
ASSERT_TRUE(m_canvas->readPixels(&canvasBitmap, 0, 0));
SkAutoLockPixels autoLock(canvasBitmap);
EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0));
« no previous file with comments | « Source/platform/DragImageTest.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698