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

Unified Diff: tests/ImageFilterTest.cpp

Issue 1183853003: skia: Add runtime option to disable picture IO security precautions (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rename functions Created 5 years, 6 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
« src/core/SkPicture.cpp ('K') | « src/effects/SkPictureImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index fc709da5afb5c5b2c92eb95755504974d232a0ef..97ce0ec3e6379a0199eb080d8d4d2861625012e5 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -859,12 +859,10 @@ DEF_TEST(ImageFilterCrossProcessPictureImageFilter, reporter) {
canvas.clear(0x0);
canvas.drawPicture(crossProcessPicture);
pixel = *bitmap.getAddr32(0, 0);
-#ifdef SK_DISALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS
- // The result here should not be green, since the filter draws nothing.
- REPORTER_ASSERT(reporter, pixel != SK_ColorGREEN);
-#else
- REPORTER_ASSERT(reporter, pixel == SK_ColorGREEN);
-#endif
+ // If the security precautions are enabled, the result here should not be green, since the
+ // filter draws nothing.
+ REPORTER_ASSERT(reporter, SkPicture::pictureIOSecurityPrecautionsEnabled()
+ ? pixel != SK_ColorGREEN : pixel == SK_ColorGREEN);
}
DEF_TEST(ImageFilterClippedPictureImageFilter, reporter) {
« src/core/SkPicture.cpp ('K') | « src/effects/SkPictureImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698