aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar mgiuca <mgiuca@chromium.org>2016-09-05 04:58:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-05 04:58:55 -0700
commit008fbd1b8e8339797d0f43164acde6357edb9dc6 (patch)
tree7500acdf98d3d072237b78914d8b1bd64e0a9736 /tests
parent3b4bc7465afb628c70c14fda97e4a1cdce574057 (diff)
Revert of Delete SkColorSpace::kUnknown_Named, remove fNamed field (patchset #1 id:20001 of https://codereview.chromium.org/2302413002/ )
Reason for revert: This CL introduced two static initializers (gAdobeRGB and gSRGB) which are causing a sizes regression on Chromium builders: https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/24981 Original issue's description: > Delete SkColorSpace::kUnknown_Named, remove fNamed field > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002 > > Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e TBR=reed@google.com,brianosman@google.com,msarett@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia:5724 Review-Url: https://codereview.chromium.org/2306313002
Diffstat (limited to 'tests')
-rw-r--r--tests/ColorSpaceTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp
index b59b6cc0cc..3eb145b2e8 100644
--- a/tests/ColorSpaceTest.cpp
+++ b/tests/ColorSpaceTest.cpp
@@ -149,15 +149,17 @@ DEF_TEST(ColorSpaceWriteICC, r) {
DEF_TEST(ColorSpace_Named, r) {
const struct {
SkColorSpace::Named fNamed;
+ bool fExpectedToSucceed;
bool fIsSRGB;
} recs[] {
- { SkColorSpace::kSRGB_Named, true },
- { SkColorSpace::kAdobeRGB_Named, false },
+ { SkColorSpace::kUnknown_Named, false, false },
+ { SkColorSpace::kSRGB_Named, true, true },
+ { SkColorSpace::kAdobeRGB_Named, true, false },
};
for (auto rec : recs) {
auto cs = SkColorSpace::NewNamed(rec.fNamed);
- REPORTER_ASSERT(r, cs);
+ REPORTER_ASSERT(r, !cs == !rec.fExpectedToSucceed);
if (cs) {
if (rec.fIsSRGB) {
REPORTER_ASSERT(r, SkColorSpace::kSRGB_GammaNamed == cs->gammaNamed());