Bug 1310681 - update devtool color function test for colorUtils.colorToRGBA default argument changing. r=tromey
authorJerryShih <hshih@mozilla.com>
Fri, 21 Oct 2016 15:29:01 -0400
changeset 327077 b91e1c0f1960
parent 327076 a6e4c1a7cc2b
child 327078 9bd751a5b031
push id31118
push userkwierso@gmail.com
push dateFri, 23 Dec 2016 22:33:43 +0000
treeherdermozilla-central@dd35d18c8e14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstromey
bugs1310681
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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");
   }
 }