Write Testing Framework for Color Management

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
We need a way to make sure that our changes to lcms don't subtly change behavior.
(Assignee)

Comment 1

10 years ago
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.
(Assignee)

Comment 2

10 years ago
Created 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

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+
(Assignee)

Comment 4

10 years ago
pushed
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
(Assignee)

Updated

10 years ago
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.