Bug 1310681 - update devtool color function test for colorUtils.colorToRGBA default argument changing. r?tromey
MozReview-Commit-ID: Aa2wW4rEDs
--- a/devtools/client/shared/test/unit/test_cssColor-03.js
+++ b/devtools/client/shared/test/unit/test_cssColor-03.js
@@ -37,25 +37,25 @@ const CSS_COLOR_4_TESTS = [
"hsl(240 25% 33%)",
"hsl(50deg 25% 33% / 0.25)",
"hsl(60 120% 60% / 0.25)",
"hSlA(5turn 40% 4%)",
];
function run_test() {
for (let test of OLD_STYLE_TESTS) {
- let ours = colorUtils.colorToRGBA(test, true);
+ let ours = colorUtils.colorToRGBA(test, false);
let platform = DOMUtils.colorToRGBA(test);
deepEqual(ours, platform, "color " + test + " matches DOMUtils");
ok(ours !== null, "'" + test + "' is a color");
}
for (let test of CSS_COLOR_4_TESTS) {
- let oursOld = colorUtils.colorToRGBA(test, true);
- let oursNew = colorUtils.colorToRGBA(test, false);
+ let oursOld = colorUtils.colorToRGBA(test, false);
+ let oursNew = colorUtils.colorToRGBA(test, true);
let platform = DOMUtils.colorToRGBA(test);
notEqual(oursOld, platform, "old style parser for color " + test +
" should not match DOMUtils");
ok(oursOld === null, "'" + test + "' is not a color with old parser");
deepEqual(oursNew, platform, `css-color-4 parser for color ${test} matches DOMUtils`);
ok(oursNew !== null, "'" + test + "' is a color with css-color-4 parser");
}
}