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

Unified Diff: gm/gm_expectations.cpp

Issue 15986004: Revert "Add path utils, plus a test for it." (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | « gm/gm_expectations.h ('k') | gm/gmmain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gm_expectations.cpp
diff --git a/gm/gm_expectations.cpp b/gm/gm_expectations.cpp
index 46cfea12366f8c5e7ab5d050ae98f398acc6a18f..8138af78907e3fd34286d69f9f524b0d0fa1cf16 100644
--- a/gm/gm_expectations.cpp
+++ b/gm/gm_expectations.cpp
@@ -37,6 +37,15 @@ namespace skiagm {
va_end(args);
}
+ SkString SkPathJoin(const char *rootPath, const char *relativePath) {
+ SkString result(rootPath);
+ if (!result.endsWith(SkPATH_SEPARATOR)) {
+ result.appendUnichar(SkPATH_SEPARATOR);
+ }
+ result.append(relativePath);
+ return result;
+ }
+
Json::Value CreateJsonTree(Json::Value expectedResults,
Json::Value actualResultsFailed,
Json::Value actualResultsFailureIgnored,
@@ -185,7 +194,7 @@ namespace skiagm {
// IndividualImageExpectationsSource class...
Expectations IndividualImageExpectationsSource::get(const char *testName) {
- SkString path = SkOSPath::SkPathJoin(fRootDir.c_str(), testName);
+ SkString path = SkPathJoin(fRootDir.c_str(), testName);
SkBitmap referenceBitmap;
bool decodedReferenceBitmap =
SkImageDecoder::DecodeFile(path.c_str(), &referenceBitmap,
« no previous file with comments | « gm/gm_expectations.h ('k') | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698