Add tests for <input type="search">
Categories
(Core :: Layout, task)
Tracking
()
People
(Reporter: ntim, Unassigned)
References
(Blocks 1 open bug)
Details
Needs tests for:
- Clear button rendering/behaviour
input
/beforeinput
event dispatching: https://phabricator.services.mozilla.com/D56302#inline-369205- click event
event.preventDefault()
interaction with clear button: https://phabricator.services.mozilla.com/D56302#inline-369182 - how to hide/change the clear button
- maybe more things?
Comment 1•4 years ago
|
||
We need to add some basic tests for this feature pretty soon, or else it's likely to break without anyone noticing.
(It's preffed off by default and never preffed on in our automated test suite right now.)
Comment 2•4 years ago
|
||
(I noticed this because I'm reviewing a patch that touches this file in https://phabricator.services.mozilla.com/D108305#C3695959NL1 , and a lint warning helpfully says "WARNING: This file is uncovered". I was about to file a bug for the missing test coverage, and then ran across this bug. :) )
For first few tests here, I'd suggest reftests to verify that:
- <input type="search"> looks exactly like <input>
- <input type="search" placeholder="testing"> looks exactly like <input placeholder="testing">
- <input type="search" value="testing"> does not match <input value="testing">
- ...but it does match if you cover up the right ~half of the widget.
Comment 3•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #2)
For first few tests here, I'd suggest reftests to verify that:
- <input type="search"> looks exactly like <input>
[...]- <input type="search" value="testing"> does not match <input value="testing">
(update: Emilio added two tests of this^ form -- "search-basic.html" and "search-with-value.html" -- in https://hg.mozilla.org/integration/autoland/rev/44eddd702c0a , so we've got a bit more coverage now.)
Description
•