This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Created attachment 1044 [details] Proposed patch Patch submitted for review. I've tested it in all major browsers, and it looks to be correct. assert_interface works for common interfaces in IE9, and in Firefox 9.0a2 for NodeList (but not for others yet); WebKit and Opera have some bugs. assert_operation likewise works in UAs, although max_args > 0 fails in some browsers because they make .length 0 always instead of equal to the maximum number of arguments. There's one apparent WebIDL spec bug I caught, bug 14813. I test for how browsers behave, not what the spec requires. See also the two TODOs.
IRC discussion suggested this would be better done by a function that would generate entire tests (not assertions), preferably something that just parsed an arbitrary IDL block. This seems like a better approach than my patch. I could hack my patch into an initial version of such a function, which just slurps out the interface name via regex.
Pursuant to discussion, I wrote something up and checked it in. It seems to work okay. Lots more work is needed to test more things and improve the correctness of what's there. http://w3c-test.org/html/tests/resources/idlharness.js http://w3c-test.org/webapps/DOMCore/tests/submissions/AryehGregor/interfaces.html