-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[WebIDL] add tests for is an array index abstract operation #9446
Conversation
Build PASSEDStarted: 2018-02-08 23:43:25 Failing Jobs
Unstable ResultsBrowser: "Microsoftedge 16.16299" (failures allowed)View in: WPT PR Status | TravisCI
|
I'd rather test this specifically for |
Tests for document.all are in #9303 |
Don't review or merge it though, it's an automatic export! |
@TimothyGu why is testing document.all specifically a good idea here? I'd rather test a less-crazy object in the WebIDL/ tests, leaving document.all tests to a dedicated file. |
@domenic It’s not, I agree with you. But this PR currently tests |
Hmm, I guess I misunderstood your comment then, OK. |
I’m fine testing using another object. Which one would you suggest that allows testing the same things? |
Anything with an array index, right? I guess you'd ideally test all the call sites: get/set/define/delete. Maybe one object with an indexed getter only, and one object with an indexed setter? So like, NodeList and Storage? |
// https://heycam.github.io/webidl/#is-an-array-index | ||
assert_equals(document.all["4892.123"].id, "4892.123", | ||
"Numbers with decimal points are not treated as array indices"); | ||
assert_equals(document.all["-0"], undefined, "'-0' is special cased"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tested by #9303. Testing some other object that document.all
would be nice.
@tobie is this something you'd like to finish if I do review, or should we close it? |
References whatwg/webidl#517.