Open Bug 926412 Opened 6 years ago Updated 2 years ago
Add reftests for <input type=number>'s CSS pseudo-elements
Bug 635240 is adding various CSS pseudo-elements to allow the various anonymous parts of <input type=number> to be styled by content authors. We've not fixed how that should behave just yet though. We should have reftests before shipping this.
Bug 930010 means that we can't do this for now since we don't have support for running reftests with chrome privs. We could maybe test this using chrome mochitests that use windowsnapshot instead, maybe. I don't plan on trying that until January though, so if anyone wants to have a go feel free.
(In reply to Jonathan Watt [:jwatt] from comment #1) > Bug 930010 means that we can't do this for now since we don't have support > for running reftests with chrome privs. We could maybe test this using > chrome mochitests that use windowsnapshot instead, maybe. (Or perhaps we should add a hidden (i.e. not listed in all.js) pref that makes us turn on "mUnsafeRulesEnabled" even for content... Then we could stick with reftests, and just set the pref in reftest.list?)
Hmm, in the past we've had instances of people being tricked into flipping prefs that make them insecure. Not sure that would be something we'd want to ship.
That's why I suggested making it a hidden pref, so that it won't be listed in "about:config" and people wouldn't be able to just flip it. (and of course we'd also give it a sufficiently-scary-sounding name like e.g "layout.css.dangerousUnsafeRules.enabled") But yeah, agreed - shipping with it forcibly off (or with the code that reacts to it #ifdeffed out) in release builds would be even safer (though it'd make testing more complicated). Anyway, I'll stop bikeshedding now. :)
Okay, as long as we're mindful about the risk. :)
Note to self: be sure to address the last sentence in bug 951310 comment 2 when adding tests here.
And the last sentence in bug 951310 comment 3.
We also need a reftest or crashtest that has something like <input type="number" style="width:auto"> with display:none on the outermost pseudo-element (the "outer wrapper"), per bug 970257 comment 3, top chunk.
You need to log in before you can comment on or make changes to this bug.