Bug 1310681 - update devtool color function test for colorUtils.colorToRGBA default argument changing. r?tromey draft
authorJerryShih <hshih@mozilla.com>
Fri, 21 Oct 2016 15:29:01 -0400
changeset 453222 4e2b3d62895f
parent 453221 15741fa813f7
child 540400 63ccc0ad7a7e
push id39601
push userbmo:hshih@mozilla.com
push dateFri, 23 Dec 2016 01:20:43 +0000
reviewerstromey
bugs1310681
milestone53.0a1
Bug 1310681 - update devtool color function test for colorUtils.colorToRGBA default argument changing. r?tromey MozReview-Commit-ID: Aa2wW4rEDs
devtools/client/shared/test/unit/test_cssColor-03.js
--- 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");
   }
 }