Bug 122747

Summary: Introduce a WebIDL conformance test suite
Product: WebKit Reporter: Zan Dobersek <zan>
Component: Tools / TestsAssignee: Zan Dobersek <zan>
Status: RESOLVED INVALID    
Severity: Normal CC: annevk, barraclough, buildbot, cdumez, commit-queue, darin, eflews.bot, ggaren, gyuyoung.kim, rakuco, rniwa, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Provisional patch
none
Patch
none
Patch
none
Patch
none
Patch beidson: review-, eflews.bot: commit-queue-

Zan Dobersek
Reported 2013-10-14 03:45:47 PDT
The WebKit project could benefit from having a set of layout tests that would check that the WebIDL support is behaving in compliance with the standard.
Attachments
Provisional patch (213.39 KB, patch)
2013-10-14 04:31 PDT, Zan Dobersek
no flags
Patch (232.52 KB, patch)
2013-10-23 03:42 PDT, Zan Dobersek
no flags
Patch (231.67 KB, patch)
2013-10-23 06:12 PDT, Zan Dobersek
no flags
Patch (233.16 KB, patch)
2013-10-24 00:25 PDT, Zan Dobersek
no flags
Patch (233.07 KB, patch)
2013-11-13 09:25 PST, Zan Dobersek
beidson: review-
eflews.bot: commit-queue-
Zan Dobersek
Comment 1 2013-10-14 04:12:45 PDT
The current idea is to have test interfaces located under window.internals and to keep them under the new 'Internals' global context so nothing is leaked into the Web platform. For now I'm only using one interface, but more will most likely be required for a complete test effort. The constructor of that interface is hung on window.internals, along with a method to create new objects that implement that interface. The new, testing-only interfaces would be added simply to have maximum control on what is tested and how it's tested. Testing on Web-facing APIs could be disrupted by any changes to the related interfaces, and it would also unlikely cover all the corner cases. The layout tests would use the testharness.js[1] tools and the webidl2.js[2] parser. The WebIDL of the tested interface is placed into the test as text content that is then parsed and tested against an actual object implementing that interface. The idlharness.js documentation outlines such testing, and the actual test case for User Timing interfaces makes it even clearer. https://github.com/w3c/testharness.js/blob/master/idlharness.js https://github.com/w3c/web-platform-tests/blob/master/user-timing/idlharness.html
Zan Dobersek
Comment 2 2013-10-14 04:31:30 PDT
Created attachment 214142 [details] Provisional patch Here's the provisional implementation of that idea. The WebIDLTest interface is kept simple and only defines one operation that's then tested. Of course more stuff needs to be added, even for starters. The text baseline lists all the tests and their outcome. The testharness.js scripts were adjusted a bit to properly utilize window.testRunner and to also prevent printing the complete stack for failed tests since this causes the filesystem paths to be written out, producing differing output on different systems. Build targets for new files must also be added to other build systems.
Zan Dobersek
Comment 3 2013-10-14 04:34:56 PDT
(In reply to comment #1) > The layout tests would use the testharness.js[1] tools and the webidl2.js[2] parser. The WebIDL of the tested interface is placed into the test as text content that is then parsed and tested against an actual object implementing that interface. [1] https://github.com/w3c/testharness.js [2] https://github.com/darobin/webidl2.js
Zan Dobersek
Comment 4 2013-10-23 03:42:00 PDT
Build Bot
Comment 5 2013-10-23 04:18:48 PDT
Build Bot
Comment 6 2013-10-23 04:36:37 PDT
Zan Dobersek
Comment 7 2013-10-23 06:12:58 PDT
Build Bot
Comment 8 2013-10-23 06:57:16 PDT
Build Bot
Comment 9 2013-10-23 07:13:13 PDT
Zan Dobersek
Comment 10 2013-10-24 00:25:16 PDT
Zan Dobersek
Comment 11 2013-11-13 09:25:05 PST
Created attachment 216812 [details] Patch Updated test case.
EFL EWS Bot
Comment 12 2013-11-13 12:28:34 PST
Brady Eidson
Comment 13 2016-05-24 22:05:11 PDT
Comment on attachment 216812 [details] Patch Assuming that patches for review since 2013 are stale, r-
Anne van Kesteren
Comment 14 2023-08-24 03:54:56 PDT
If there's still interest in this please increase coverage of WPT and we'll import it.
Note You need to log in before you can comment on or make changes to this bug.