Open Bug 1375126 Opened 7 years ago Updated 2 years ago

Runtime warnings about undefined CSS variables should turn the tree orange


(Testing :: Mochitest, enhancement)

55 Branch


(firefox57 wontfix)

Tracking Status
firefox57 --- wontfix


(Reporter: Gijs, Unassigned)


bug 1347182 landed and broke a bunch of styling for stuff, but crucially tests were green. Part of the reason things broke was that it was using CSS variables that aren't actually defined, which cause heaps of warnings in the browser console. Missing CSS variables for style rules that do get applied are, AFAICT, always a mistake / problem, so we should try to catch them in automation. However, right now, no test framework cares about this. We try to deal with very obvious CSS mistakes using but that doesn't actually detect these cases.

It would be nice if we either had a specific test that checked for this, and/or if the mochitest framework complained about this type of console message if found after a test (much like it checks for leaks and contamination of the window global after tests). We would probably need initial whitelists as we do for some of the other static-y tests.
Component: General → CSS Parsing and Computation
Product: Firefox → Core
I think this just needs mochitest's framework files to add a console listener that yelps about CSS variable issues, and adds test failures for them.
Component: CSS Parsing and Computation → Mochitest
Product: Core → Testing
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.