Browse Source

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

Co-authored-by: Milan Burda <[email protected]>
trop[bot] 4 years ago
parent
commit
424177164e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      spec/webview-spec.js

+ 6 - 0
spec/webview-spec.js

@@ -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` });