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

Unified Diff: tests/ExifTest.cpp

Issue 2343933002: Revert of SkFontData to use smart pointers. (Closed)
Patch Set: Created 4 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 | « tests/ColorSpaceTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « tests/ColorSpaceTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698