Open Bug 1655426 Opened 5 years ago Updated 4 years ago

Add tests for <input type="search">

Categories

(Core :: Layout, task)

task

Tracking

()

People

(Reporter: ntim, Unassigned)

References

(Blocks 1 open bug)

Details

Needs tests for:

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.)

(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.

(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.)

You need to log in before you can comment on or make changes to this bug.