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

Unified Diff: gm/gm_expectations.cpp

Issue 15014011: GM: include filename extension (.png) of each output file in JSON summary (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove_imagefile_tests 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
« gm/gm.h ('K') | « gm/gm.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
===================================================================
--- gm/gm_expectations.cpp (revision 9067)
+++ gm/gm_expectations.cpp (working copy)
@@ -141,8 +141,7 @@
// IndividualImageExpectationsSource class...
Expectations IndividualImageExpectationsSource::get(const char *testName) {
- SkString path = make_filename(fRootDir.c_str(), "", testName,
- "png");
+ SkString path = make_filename(fRootDir.c_str(), "", testName, kPNG_FileExtension);
SkBitmap referenceBitmap;
bool decodedReferenceBitmap =
SkImageDecoder::DecodeFile(path.c_str(), &referenceBitmap,
@@ -165,7 +164,10 @@
}
Expectations JsonExpectationsSource::get(const char *testName) {
- return Expectations(fJsonExpectedResults[testName]);
+ SkString testNameWithExtension(testName);
+ testNameWithExtension.append(".");
+ testNameWithExtension.append(kPNG_FileExtension);
scroggo 2013/05/08 20:39:45 This will break my use of this function in skimage
epoger 2013/05/09 14:20:07 Thanks for the early warning on that. Actually, i
scroggo 2013/05/09 14:28:48 Yes. Thanks!
+ return Expectations(fJsonExpectedResults[testNameWithExtension.c_str()]);
}
/*static*/ SkData* JsonExpectationsSource::readIntoSkData(SkStream &stream, size_t maxBytes) {
« gm/gm.h ('K') | « gm/gm.h ('k') | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698