Index: tests/ExifTest.cpp |
diff --git a/tests/ExifTest.cpp b/tests/ExifTest.cpp |
index 4aac4870647db6e32090db0abd020628efc9923d..7fcd8b861d66820ef80fb8fcb905981db02a17ff 100644 |
--- a/tests/ExifTest.cpp |
+++ b/tests/ExifTest.cpp |
@@ -9,8 +9,13 @@ |
#include "SkCodec.h" |
#include "Test.h" |
+static SkStreamAsset* resource(const char path[]) { |
+ SkString fullPath = GetResourcePath(path); |
+ return SkStream::NewFromFile(fullPath.c_str()); |
+} |
+ |
DEF_TEST(ExifOrientation, r) { |
- SkAutoTDelete<SkStream> stream(GetResourceAsStream("exif-orientation-2-ur.jpg")); |
+ SkAutoTDelete<SkStream> stream(resource("exif-orientation-2-ur.jpg")); |
REPORTER_ASSERT(r, nullptr != stream); |
if (!stream) { |
return; |
@@ -21,7 +26,7 @@ |
SkCodec::Origin origin = codec->getOrigin(); |
REPORTER_ASSERT(r, SkCodec::kTopRight_Origin == origin); |
- stream.reset(GetResourceAsStream("mandrill_512_q075.jpg")); |
+ stream.reset(resource("mandrill_512_q075.jpg")); |
codec.reset(SkCodec::NewFromStream(stream.release())); |
REPORTER_ASSERT(r, nullptr != codec); |
origin = codec->getOrigin(); |