Bug 1465628 part 4 - Update test to check more stuff. r=tromey
☠☠ backed out by a9e6e98ff2c2 ☠ ☠
authorXidorn Quan <me@upsuper.org>
Thu, 31 May 2018 15:54:08 +1000
changeset 421237 04f276eb2f0ea509ded9f185c0f3287ba3b91b87
parent 421236 e9cdff1227930054a35a2af291a3f945b99f5e08
child 421238 a9e6e98ff2c2abe8986d24221cb2c4ae7204a5ba
push id64837
push userxquan@mozilla.com
push dateTue, 05 Jun 2018 00:42:48 +0000
treeherderautoland@04f276eb2f0e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstromey
bugs1465628
milestone62.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 1465628 part 4 - Update test to check more stuff. r=tromey This change adds a preferences check based on the change before. It also removes the skipping of "all" because we generate subproperties of "all" shorthand in a platform-neutral way. That list shouldn't be affected by any preference. MozReview-Commit-ID: LJyxGXJxvfW
devtools/shared/css/generated/properties-db.js
devtools/shared/tests/unit/test_css-properties-db.js
--- a/devtools/shared/css/generated/properties-db.js
+++ b/devtools/shared/css/generated/properties-db.js
@@ -2963,16 +2963,24 @@ exports.CSS_PROPERTIES = {
       "-webkit-text-fill-color",
       "-webkit-text-stroke-color",
       "-webkit-text-stroke-width",
       "ruby-align",
       "ruby-position",
       "text-combine-upright",
       "text-rendering",
       "-moz-control-character-visibility",
+      "cursor",
+      "pointer-events",
+      "-moz-user-input",
+      "-moz-user-modify",
+      "-moz-user-focus",
+      "caret-color",
+      "scrollbar-face-color",
+      "scrollbar-track-color",
       "list-style-position",
       "list-style-type",
       "list-style-image",
       "quotes",
       "-moz-image-region",
       "margin-top",
       "margin-right",
       "margin-bottom",
@@ -2984,22 +2992,16 @@ exports.CSS_PROPERTIES = {
       "-moz-outline-radius-topright",
       "-moz-outline-radius-bottomright",
       "-moz-outline-radius-bottomleft",
       "outline-offset",
       "padding-top",
       "padding-right",
       "padding-bottom",
       "padding-left",
-      "cursor",
-      "pointer-events",
-      "-moz-user-input",
-      "-moz-user-modify",
-      "-moz-user-focus",
-      "caret-color",
       "top",
       "right",
       "bottom",
       "left",
       "z-index",
       "flex-direction",
       "flex-wrap",
       "justify-content",
@@ -9253,16 +9255,24 @@ exports.PREFERENCES = [
     "scroll-snap-type-x",
     "layout.css.scroll-snap.enabled"
   ],
   [
     "scroll-snap-type-y",
     "layout.css.scroll-snap.enabled"
   ],
   [
+    "scrollbar-face-color",
+    "layout.css.scrollbar-colors.enabled"
+  ],
+  [
+    "scrollbar-track-color",
+    "layout.css.scrollbar-colors.enabled"
+  ],
+  [
     "shape-image-threshold",
     "layout.css.shape-outside.enabled"
   ],
   [
     "shape-margin",
     "layout.css.shape-outside.enabled"
   ],
   [
--- a/devtools/shared/tests/unit/test_css-properties-db.js
+++ b/devtools/shared/tests/unit/test_css-properties-db.js
@@ -31,36 +31,34 @@ function run_test() {
                                  "assertion run `mach devtools-css-db` to re-generate " +
                                  "the client side properties.";
 
   // Check that the platform and client match for pseudo elements.
   deepEqual(PSEUDO_ELEMENTS, InspectorUtils.getCSSPseudoElementNames(),
             "The pseudo elements match on the client and platform. " +
             propertiesErrorMessage);
 
+  let prefs = InspectorUtils.getCSSPropertyPrefs();
+  deepEqual(PREFERENCES, prefs.map(({name, pref}) => [name, pref]),
+            "The preferences match on the client and platform. " +
+            propertiesErrorMessage);
+
   /**
    * Check that the platform and client match for the details on their CSS properties.
    * Enumerate each property to aid in debugging. Sometimes these properties don't
    * completely agree due to differences in preferences. Check the currently set
    * preference for that property to see if it's enabled.
    */
   const platformProperties = generateCssProperties();
 
   for (const propertyName in CSS_PROPERTIES) {
     const platformProperty = platformProperties[propertyName];
     const clientProperty = CSS_PROPERTIES[propertyName];
     const deepEqual = isJsonDeepEqual(platformProperty, clientProperty);
 
-    // The "all" property can contain information that can be turned on and off by
-    // preferences. These values can be different between OSes, so ignore the equality
-    // check for this property, since this is likely to fail.
-    if (propertyName === "all") {
-      continue;
-    }
-
     if (deepEqual) {
       ok(true, `The static database and platform match for "${propertyName}".`);
     } else {
       ok(false, `The static database and platform do not match for ` + `
         "${propertyName}". ${propertiesErrorMessage}`);
     }
   }