aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageFilterTest.cpp
diff options
context:
space:
mode:
authorGravatar hendrikw <hendrikw@chromium.org>2015-06-16 09:28:37 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-16 09:28:37 -0700
commit446ee67fda73b11281b8e28a68edec811347c0c5 (patch)
treeba5be6dc7c9acb93e7d6bde7d2ac292a73712ca7 /tests/ImageFilterTest.cpp
parent0fce1fb02d93e66d42528f322f8aa4ca64ff0fb2 (diff)
skia: Add runtime option to disable picture IO security precautions
Replaced the compile time file IO security setting with a runtime setting. Unfortunately the setting is global. Review URL: https://codereview.chromium.org/1183853003
Diffstat (limited to 'tests/ImageFilterTest.cpp')
-rw-r--r--tests/ImageFilterTest.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index fc709da5af..20bf0aa6d3 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) {