Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect assertions in HTMLInputElement tests? #17792

Open
droeh opened this issue Jul 11, 2019 · 3 comments

Comments

@droeh
Copy link

@droeh droeh commented Jul 11, 2019

I'm adding support for the capture attribute to Gecko and I'm a bit confused by two assertions:

assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: '', newValue: 'user', namespace: null});

assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: '', newValue: 'asdf', namespace: null});

Shouldn't the oldValue in both of these assertions be null rather than an empty string? It doesn't seem to me that capture is getting set anywhere prior in order for the old value to be non-null.

@gsnedders

This comment has been minimized.

Copy link
Contributor

@gsnedders gsnedders commented Nov 19, 2019

cc/ @Honry who wrote these tests, admittedly years ago. (also @domenic and @annevk in case they know)

@annevk

This comment has been minimized.

Copy link
Member

@annevk annevk commented Nov 19, 2019

The other problem with this test is the if ('capture' in HTMLInputElement.prototype) { conditional. If this is a tentative test it should be marked as such, but it shouldn't contain optional parts.

@domenic

This comment has been minimized.

Copy link
Member

@domenic domenic commented Nov 19, 2019

Yes, I think it should be null instead of empty string. And also the file should be renamed to something like HTMLInputElement-capture, and the conditional-ness removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.