Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check MIDIMessageEvent, don't check undefined objects in WebMIDI WPT
The WebMIDI API does not have constructors for MIDIAccess, MIDIInputMap, or MIDIOutputMap. If the call to navigator.requestMIDIAccess() fails all three of these will be undefined references. This results in additional failures logged for user agents which have security policies that prevent navigator.requestMIDIAccess() from working in the WPT test run environment. However, we don't actually know if those tests would pass or not if the MIDIAccess object could be constructed. The tests that require an object should be omitted instead. This CL only adds these objects to the IDL array after the factory method succeeds. User agents that can construct MIDIAccess will test as normal, but agents that cannot will simply omit the tests that require objects. This CL also adds MIDIMessageEvent which was missing from the test, and explicitly adds MIDIPort to the list of objects for completeness. Change-Id: If004cda1a69fdb37097dbf52011e63f8dfa166ad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4482975 Commit-Queue: Michael Wilson <[email protected]> Reviewed-by: Hongchan Choi <[email protected]> Cr-Commit-Position: refs/heads/main@{#1136694}
- Loading branch information