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

Unified Diff: tests/ImageDecodingTest.cpp

Issue 346453002: Refactor how we handle resources path in Tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix rebase conflict Created 6 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
« no previous file with comments | « tests/FontHostTest.cpp ('k') | tests/KtxTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageDecodingTest.cpp
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index 3b9c194929db6a4ce790348d4b03a6e5efc455c5..89db3990e4b8703b6e1ece595c68ce425cec72b2 100644
--- a/tests/ImageDecodingTest.cpp
+++ b/tests/ImageDecodingTest.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "Resources.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColor.h"
@@ -148,7 +149,7 @@ static void compare_unpremul(skiatest::Reporter* reporter, const SkString& filen
static void test_unpremul(skiatest::Reporter* reporter) {
// This test cannot run if there is no resource path.
- SkString resourcePath = skiatest::Test::GetResourcePath();
+ SkString resourcePath = GetResourcePath();
if (resourcePath.isEmpty()) {
SkDebugf("Could not run unpremul test because resourcePath not specified.");
return;
@@ -230,7 +231,7 @@ static void test_alphaType(skiatest::Reporter* reporter, const SkString& filenam
}
DEF_TEST(ImageDecoding_alphaType, reporter) {
- SkString resourcePath = skiatest::Test::GetResourcePath();
+ SkString resourcePath = GetResourcePath();
if (resourcePath.isEmpty()) {
SkDebugf("Could not run alphaType test because resourcePath not specified.");
return;
@@ -253,7 +254,7 @@ DEF_TEST(ImageDecoding_alphaType, reporter) {
// Using known images, test that decoding into unpremul and premul behave as expected.
DEF_TEST(ImageDecoding_unpremul, reporter) {
- SkString resourcePath = skiatest::Test::GetResourcePath();
+ SkString resourcePath = GetResourcePath();
if (resourcePath.isEmpty()) {
SkDebugf("Could not run unpremul test because resourcePath not specified.");
return;
@@ -502,7 +503,7 @@ static SkPixelRef* install_pixel_ref(SkBitmap* bitmap,
* SkInstallDiscardablePixelRef functions.
*/
DEF_TEST(ImprovedBitmapFactory, reporter) {
- SkString resourcePath = skiatest::Test::GetResourcePath();
+ SkString resourcePath = GetResourcePath();
SkString path = SkOSPath::SkPathJoin(
resourcePath.c_str(), "randPixels.png");
SkAutoTUnref<SkStreamRewindable> stream(
@@ -676,7 +677,7 @@ DEF_TEST(ImageDecoderOptions, reporter) {
#endif
};
- SkString resourceDir = skiatest::Test::GetResourcePath();
+ SkString resourceDir = GetResourcePath();
if (!sk_exists(resourceDir.c_str())) {
return;
}
« no previous file with comments | « tests/FontHostTest.cpp ('k') | tests/KtxTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698