test: skip media-started-playing media-paused events test when media not supported (#27215)

This commit is contained in:
Milan Burda 2021-01-07 23:43:20 +01:00 committed by GitHub
parent 904d2ff4cc
commit 00d4baa0e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -934,6 +934,12 @@ describe('<webview> tag', function () {
});
describe('media-started-playing media-paused events', () => {
beforeEach(function () {
if (!document.createElement('audio').canPlayType('audio/wav')) {
this.skip();
}
});
it('emits when audio starts and stops playing', async () => {
await loadWebView(webview, { src: `file://${fixtures}/pages/base-page.html` });