You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.
I was writing an idlharness.js test and I didn't realize at first that I had to explicitly add_objects for all of the attributes on my top-level object that implement other interfaces I want tested. The Gamepad spec has (edited for brevity):
It seems like we could do better here and auto-test everything that's reachable from anything passed to add_objects. (Also it might not hurt to have an error for something that's been passed to add_idls and not tested, which doesn't seem to be the case.)
The text was updated successfully, but these errors were encountered:
The argument against this behaviour is that one can debate as to how far one should go with this. It seems like we don't want to go too far such that we end up actually doing complex behaviour (that a UA could potentially fail—we are a test suite after all!) in trying to gather tests, as that's just a world of badness. On the other hand, as your example shows, people will often just have to write what we could automatically deduce, so we're relying on the same thing either way. Maybe we should limit it to something like a DFS for attributes (and not even call operations with no arguments)? I don't know what the right answer here is.
I agree we ought to have an error for things that have been passed to add_ids and not an object, though.
+1 to error; especially in tests where the IDL is pulled out into an external file (e.g. to support Window and XxxWorker variants), getting out of sync becomes quite easy.
I was writing an idlharness.js test and I didn't realize at first that I had to explicitly add_objects for all of the attributes on my top-level object that implement other interfaces I want tested. The Gamepad spec has (edited for brevity):
I kind of expected that when I added the full set of interfaces via add_idls and called:
that Gamepad and GamepadButton would be tested as they're reachable from GamepadEvent. That's not the case, however and I have to write:
It seems like we could do better here and auto-test everything that's reachable from anything passed to add_objects. (Also it might not hurt to have an error for something that's been passed to add_idls and not tested, which doesn't seem to be the case.)
The text was updated successfully, but these errors were encountered: