Closed Bug 450454 Opened 11 years ago Closed 11 years ago

Write Testing Framework for Color Management

Categories

(Core :: GFX: Color Management, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(1 file)

We need a way to make sure that our changes to lcms don't subtly change behavior.
As it turns out, we can't do things with reftests or mochitests because of the variance between output profiles. Because color profiles are clamped, the transformations are actually nonlinear, so it's not a simple lining up of matrices and interpolations. For example, if you use GIMP to convert an image to one color space, save, and then convert it back, you don't end up with the original image - some information is lost.

Given that there's no way to select an output profile from within any of the test frameworks (reftests, mochitests), and then we would need to reboot the browser anyway, I decided to write a standalone testing framework. It appears to work well. Posting it for review in a moment.
I've attached the testing patch. It takes a fair amount of time, and I don't think it's worth running at every checkin given that it really only tests lcms internals. As such, given that I'm pretty much the CM owner at this point, probably the best solution is just to have me review any patches that touch lcms and insist that people run the tests. I'll keep an eye on it.

This code isn't actually included in firefox, so I didn't scan it that hard for bugs. As such I might have missed stuff. Regardless, it's clean code and it appears to work well.

I plan to incrementally add code to test the different rendering paths I've introduced as I land those patches.
Attachment #333660 - Flags: review?(joe)
Comment on attachment 333660 [details] [diff] [review]
testing framework patch - doesn't include the test profile directory (for obvious reasons) which will be included in the actual commit

Looks fine; add some comments in lcms saying that this test should be run whenever anything related to lcms is touched, though...
Attachment #333660 - Flags: review?(joe) → review+
pushed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
Component: GFX → GFX: Color Management
Product: Core Graveyard → Core
QA Contact: general → color-management
You need to log in before you can comment on or make changes to this bug.