From 406ebd614d44d12aeeb16acc99b0932f9e6490cb Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 21 Jul 2020 07:57:47 +0000 Subject: [PATCH] Bug 1654004 - Tweak browser_parsable_css.js to account for other rules when the ::file-chooser-button pref is disabled. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D84271 --- .../base/content/test/static/browser_parsable_css.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/browser/base/content/test/static/browser_parsable_css.js b/browser/base/content/test/static/browser_parsable_css.js index 081913f44daa..d804febd9419 100644 --- a/browser/base/content/test/static/browser_parsable_css.js +++ b/browser/base/content/test/static/browser_parsable_css.js @@ -50,13 +50,6 @@ let whitelist = [ errorMessage: /Unknown property.*overflow-clip-box/i, isFromDevTools: false, }, - // System colors reserved to UA / chrome sheets - { - sourceName: /(?:res|gre-resources)\/forms\.css$/i, - errorMessage: /Expected color but found \u2018-moz.*/i, - platforms: ["linux"], - isFromDevTools: false, - }, // These variables are declared somewhere else, and error when we load the // files directly. They're all marked intermittent because their appearance // in the error console seems to not be consistent. @@ -81,7 +74,15 @@ if ( }); } -if (!Services.prefs.getBoolPref("layout.css.file-chooser-button.enabled")) { +if (Services.prefs.getBoolPref("layout.css.file-chooser-button.enabled")) { + // System colors reserved to UA / chrome sheets + whitelist.push({ + sourceName: /(?:res|gre-resources)\/forms\.css$/i, + errorMessage: /Expected color but found \u2018-moz.*/i, + platforms: ["linux"], + isFromDevTools: false, + }); +} else { // Reserved to UA sheets, behind a pref for content. whitelist.push({ sourceName: /(?:res|gre-resources)\/forms\.css$/i, -- 2.11.4.GIT