diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-21 18:04:09 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-21 18:04:09 +0000 |
commit | 8fc3766c58ec879389c3c83c96a73e50ff59eb78 (patch) | |
tree | 1e8705b3fa282da9ad8630867943b008b8e9ae79 /gm | |
parent | 47ae4b0d54cb3d6b12ceed9ed74a0cfc4f9fd181 (diff) |
Update expectations for Mac PDF
R=epoger@google.com, vandebo@chromium.org
Review URL: https://codereview.chromium.org/22865029
git-svn-id: http://skia.googlecode.com/svn/trunk@10863 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/gmmain.cpp | 23 | ||||
-rw-r--r-- | gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt | 4 | ||||
-rw-r--r-- | gm/tests/outputs/add-config-pdf/output-expected/mismatchPath/pdf-poppler/bogusfile (renamed from gm/tests/outputs/add-config-pdf/output-expected/mismatchPath/pdf_poppler/bogusfile) | 0 | ||||
-rw-r--r-- | gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf-poppler/bogusfile (renamed from gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf_poppler/bogusfile) | 0 | ||||
-rw-r--r-- | gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf-poppler/selftest1.png (renamed from gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf/selftest1.png) | 2 | ||||
-rw-r--r-- | gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf-poppler/bogusfile (renamed from gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf_poppler/bogusfile) | 0 | ||||
-rw-r--r-- | gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf-poppler/selftest1.png (renamed from gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf_poppler/selftest1.png) | 2 |
7 files changed, 16 insertions, 15 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index 4db3a0d242..32ad413b9f 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -860,14 +860,15 @@ public: * * @param gm which test generated the actualBitmap * @param gRec + * @param configName The config name to look for in the expectation file. * @param actualBitmapAndDigest ptr to bitmap generated by this run, or NULL * if we don't have a usable bitmap representation */ ErrorCombination compare_test_results_to_stored_expectations( - GM* gm, const ConfigData& gRec, + GM* gm, const ConfigData& gRec, const char* configName, const BitmapAndDigest* actualBitmapAndDigest) { - SkString shortNamePlusConfig = make_shortname_plus_config(gm->shortName(), gRec.fName); + SkString shortNamePlusConfig = make_shortname_plus_config(gm->shortName(), configName); ErrorCombination errors; @@ -905,7 +906,7 @@ public: */ Expectations expectations = expectationsSource->get(nameWithExtension.c_str()); errors.add(compare_to_expectations(expectations, *actualBitmapAndDigest, - gm->shortName(), gRec.fName, "", true)); + gm->shortName(), configName, "", true)); } else { // If we are running without expectations, we still want to // record the actual results. @@ -1022,7 +1023,7 @@ public: } BitmapAndDigest bitmapAndDigest(*bitmap); errors.add(compare_test_results_to_stored_expectations( - gm, gRec, &bitmapAndDigest)); + gm, gRec, gRec.fName, &bitmapAndDigest)); if (writePath && (gRec.fFlags & kWrite_ConfigFlag)) { path = make_bitmap_filename(writePath, gm->shortName(), gRec.fName, @@ -1051,14 +1052,14 @@ public: continue; } - BitmapAndDigest bitmapAndDigest(pdfBitmap); - errors.add(compare_test_results_to_stored_expectations( - gm, gRec, &bitmapAndDigest)); - SkString configName(gRec.fName); - configName.append("_"); + configName.append("-"); configName.append(pdfRasterizers[i]->fName); + BitmapAndDigest bitmapAndDigest(pdfBitmap); + errors.add(compare_test_results_to_stored_expectations( + gm, gRec, configName.c_str(), &bitmapAndDigest)); + if (writePath && (gRec.fFlags & kWrite_ConfigFlag)) { path = make_bitmap_filename(writePath, gm->shortName(), configName.c_str(), "", bitmapAndDigest.fDigest); @@ -1073,7 +1074,7 @@ public: SkAutoTUnref<SkStreamAsset> documentStream(document.detachAsStream()); errors.add(compare_test_results_to_stored_expectations( - gm, gRec, NULL)); + gm, gRec, gRec.fName, NULL)); if (writePath && (gRec.fFlags & kWrite_ConfigFlag)) { path = make_filename(writePath, gm->shortName(), gRec.fName, "", "xps"); @@ -1825,7 +1826,7 @@ static bool prepare_subdirectories(const char *root, bool useFileHierarchy, if (config.fBackend == kPDF_Backend) { for (int j = 0; j < pdfRasterizers.count(); j++) { SkString pdfSubdir = subdir; - pdfSubdir.appendf("_%s", pdfRasterizers[j]->fName); + pdfSubdir.appendf("-%s", pdfRasterizers[j]->fName); if (!sk_mkdir(pdfSubdir.c_str())) { return false; } diff --git a/gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt b/gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt index 52eedd4cbf..a341d6a459 100644 --- a/gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt +++ b/gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt @@ -3,7 +3,7 @@ "failed" : null, "failure-ignored" : null, "no-comparison" : { - "pdf/selftest1.png" : [ "bitmap-64bitMD5", 1149339852105949057 ] + "pdf-poppler/selftest1.png" : [ "bitmap-64bitMD5", 1149339852105949057 ] }, "succeeded" : { "565/selftest1.png" : [ "bitmap-64bitMD5", 12927999507540085554 ], @@ -23,7 +23,7 @@ ], "ignore-failure" : false }, - "pdf/selftest1.png" : { + "pdf-poppler/selftest1.png" : { "allowed-digests" : null, "ignore-failure" : false } diff --git a/gm/tests/outputs/add-config-pdf/output-expected/mismatchPath/pdf_poppler/bogusfile b/gm/tests/outputs/add-config-pdf/output-expected/mismatchPath/pdf-poppler/bogusfile index d86cd5bdd8..d86cd5bdd8 100644 --- a/gm/tests/outputs/add-config-pdf/output-expected/mismatchPath/pdf_poppler/bogusfile +++ b/gm/tests/outputs/add-config-pdf/output-expected/mismatchPath/pdf-poppler/bogusfile diff --git a/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf_poppler/bogusfile b/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf-poppler/bogusfile index d86cd5bdd8..d86cd5bdd8 100644 --- a/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf_poppler/bogusfile +++ b/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf-poppler/bogusfile diff --git a/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf/selftest1.png b/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf-poppler/selftest1.png index e5584b8c65..b644e4ded7 100644 --- a/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf/selftest1.png +++ b/gm/tests/outputs/add-config-pdf/output-expected/missingExpectationsPath/pdf-poppler/selftest1.png @@ -1 +1 @@ -[contents of gm/tests/outputs/add-config-pdf/output-actual/missingExpectationsPath/pdf/selftest1.png] +[contents of gm/tests/outputs/add-config-pdf/output-actual/missingExpectationsPath/pdf-poppler/selftest1.png] diff --git a/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf_poppler/bogusfile b/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf-poppler/bogusfile index d86cd5bdd8..d86cd5bdd8 100644 --- a/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf_poppler/bogusfile +++ b/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf-poppler/bogusfile diff --git a/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf_poppler/selftest1.png b/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf-poppler/selftest1.png index 5d008d8174..052f1a98fb 100644 --- a/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf_poppler/selftest1.png +++ b/gm/tests/outputs/add-config-pdf/output-expected/writePath/pdf-poppler/selftest1.png @@ -1 +1 @@ -[contents of gm/tests/outputs/add-config-pdf/output-actual/writePath/pdf_poppler/selftest1.png] +[contents of gm/tests/outputs/add-config-pdf/output-actual/writePath/pdf-poppler/selftest1.png] |