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

Unified Diff: Source/web/tests/WebFrameTest.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/image-decoders/ImageFrame.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 629eec70fd68d5de57cecfe4a7073e72187ea154..d934ff59cb27df5acccfa3acaa914a0fa771dbd6 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -2194,7 +2194,7 @@ TEST_F(WebFrameTest, pageScaleFactorScalesPaintClip)
webViewHelper.webView()->setPageScaleFactor(0.5);
SkBitmap bitmap;
- ASSERT_TRUE(bitmap.allocN32Pixels(200, 200));
+ bitmap.allocN32Pixels(200, 200);
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
@@ -5824,7 +5824,7 @@ static void nodeImageTestValidation(const blink::IntSize& referenceBitmapSize, b
{
// Prepare the reference bitmap.
SkBitmap bitmap;
- ASSERT_TRUE(bitmap.allocN32Pixels(referenceBitmapSize.width(), referenceBitmapSize.height()));
+ bitmap.allocN32Pixels(referenceBitmapSize.width(), referenceBitmapSize.height());
SkCanvas canvas(bitmap);
canvas.drawColor(SK_ColorGREEN);
« no previous file with comments | « Source/platform/image-decoders/ImageFrame.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698