diff --git a/spec/fixtures/pages/audio.html b/spec/fixtures/pages/audio.html
index 0fda8e7075bc..575c8da885b7 100644
--- a/spec/fixtures/pages/audio.html
+++ b/spec/fixtures/pages/audio.html
@@ -1 +1 @@
-
+
diff --git a/spec/webview-spec.js b/spec/webview-spec.js
index c82be9bb7097..a090a3a48de8 100644
--- a/spec/webview-spec.js
+++ b/spec/webview-spec.js
@@ -963,11 +963,17 @@ describe(' tag', function () {
})
})
- // TODO(alexeykuzmin): Enable the tests.
- xdescribe('media-started-playing media-paused events', () => {
+ describe('media-started-playing media-paused events', () => {
it('emits when audio starts and stops playing', async () => {
- loadWebView(webview, {src: `file://${fixtures}/pages/audio.html`})
+ await loadWebView(webview, {src: `file://${fixtures}/pages/audio.html`})
+
+ // XXX(alexeykuzmin): Starting from Ch66 playing an audio requires
+ // a user interaction. See https://goo.gl/xX8pDD.
+
+ webview.executeJavaScript('document.querySelector("audio").play()', true)
await waitForEvent(webview, 'media-started-playing')
+
+ webview.executeJavaScript('document.querySelector("audio").pause()', true)
await waitForEvent(webview, 'media-paused')
})
})