Open Bug 1864327 Opened 6 months ago Updated 6 months ago

dom/html/test/forms/test_required_attribute.html is not testing correctly

Categories

(Core :: DOM: Forms, task)

task

Tracking

()

People

(Reporter: standard8, Unassigned, NeedInfo)

References

Details

I'm trying to enable the ESLint rule no-cond-assign on all of dom. When doing so, it highlighted that this line is wrong:

https://searchfox.org/mozilla-central/rev/f9ac1c0115f4ba80893c3c305a14907ad5852473/dom/html/test/forms/test_required_attribute.html#184

} else if (element.type = 'month') {

It should be a double-equals rather than a single. I've tried correcting it locally, and there are lots of test failures as a result, e.g.

FAIL Element should not suffer from value missing
FAIL Element should be valid
...

I suspect there's nothing real broken here, but the if/else chain may be missing more cases.

The incorrect line was initially introduced in bug 1278737.

:smaug, as you reviewed it, any chance you could take a look?

Flags: needinfo?(smaug)
Component: DOM: Core & HTML → DOM: Forms
You need to log in before you can comment on or make changes to this bug.