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
Start centralizing IDLs to reduce duplication and errors #5666
Conversation
LintPassed |
*This report has been truncated because the total content is 2975844 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Firefox (nightly channel)Testing web-platform-tests at revision 3acd1b3 All results3 tests ran/XMLHttpRequest/interfaces.html
/dom/interfaces.html
|
*This report has been truncated because the total content is 3005938 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Chrome (unstable channel)Testing web-platform-tests at revision 3acd1b3 All results3 tests ran/XMLHttpRequest/interfaces.html
|
Notifying @Manishearth, @annevk, @caitp, @emilio, @hallvors, @ibelem, @jdm, @jungkees, @kangxu, @mathiasbynens, @ronkorving, @wisniewskit, @zcorpan, and @zqzhang. (Learn how reviewing works.) |
This is really great! With this setup, I'm confident that we'd be able to use tooling that @mdittmer is building to compare IDLs to also update these IDL files whenever specs change. Perhaps it would then be helpful for each IDL file to link to its spec, but we can add that later. |
XMLHttpRequest/interfaces.html
Outdated
} | ||
|
||
promise_test(function() { | ||
// Have to wait for onload |
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.
Why do we need to wait for the load event?
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.
Um, cargo-culting? :) (I don't know why the original html/dom/interfaces.html does either, but maybe it's so that all the objects are properly initialized.) Fixed in new version.
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.
Yay.
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.
LGTM with question. Feel free to merge without further roundtrip.
Fixes web-platform-tests#5339 (or rather, starts to). We had two copies of the DOM IDL, one in dom/ and one in html/, which were out of sync. Additionally, tons of tests copy bits and pieces of IDLs from specs like DOM, or define stubs, instead of properly including the whole IDL. These should be fixed to include the whole IDL, because some tests may need to know about the entire base interface (e.g., testing that objects inherit properly). I chose to make the IDLs centralized because we might want to process them centrally in the future. For instance, we could have a script to update all of them, or a test that checks for non-standard properties on the global object and imports all the IDLs to get a list of standard properties. These seem easier to do if the IDLs are all in one place.
These tests are now available on w3c-test.org |
This broke |
Fixes #5339 (or rather, starts to).
We had two copies of the DOM IDL, one in dom/ and one in html/, which
were out of sync. Additionally, tons of tests copy bits and pieces of
IDLs from specs like DOM, or define stubs, instead of properly including
the whole IDL. These should be fixed to include the whole IDL, because
some tests may need to know about the entire base interface (e.g.,
testing that objects inherit properly).
I chose to make the IDLs centralized because we might want to process
them centrally in the future. For instance, we could have a script to
update all of them, or a test that checks for non-standard properties on
the global object and imports all the IDLs to get a list of standard
properties. These seem easier to do if the IDLs are all in one place.
This change is