API test WebKit2.MSEIsPlayingAudio timing out after r200951
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 May 2016 23:19:36 +0000 (23:19 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 May 2016 23:19:36 +0000 (23:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157748

Reviewed by Eric Carlson.

The file-with-mse.html testcase only calls play() once it's own XHR loading is complete; the
"user gesture" check fails at that point.  Call play() up front; playback will begin as soon
as enough data is loaded.

* TestWebKitAPI/Tests/WebKit2/file-with-mse.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2/file-with-mse.html

index 0f5e84a..490f0e7 100644 (file)
@@ -1,3 +1,16 @@
+2016-05-16  Jer Noble  <jer.noble@apple.com>
+
+        API test WebKit2.MSEIsPlayingAudio timing out after r200951
+        https://bugs.webkit.org/show_bug.cgi?id=157748
+
+        Reviewed by Eric Carlson.
+
+        The file-with-mse.html testcase only calls play() once it's own XHR loading is complete; the
+        "user gesture" check fails at that point.  Call play() up front; playback will begin as soon
+        as enough data is loaded.
+
+        * TestWebKitAPI/Tests/WebKit2/file-with-mse.html:
+
 2016-05-16  Enrica Casucci  <enrica@apple.com>
 
         Remove unused initializer for WebEvent on iOS.
index 413eed6..4cc9101 100644 (file)
@@ -7,6 +7,7 @@
 
       function playVideo()
       {
+          document.getElementById('test-video').play();
           request = new XMLHttpRequest();
           request.responseType = 'arraybuffer';
           request.open('GET', 'test-mse.mp4', true);
       {
           var sourceBuffer = source.addSourceBuffer('video/mp4;codecs="avc1.4D4001,mp4a.40.2"');
           sourceBuffer.appendBuffer(request.response);
-          sourceBuffer.addEventListener('updateend', updateend);
-      }
-
-      function updateend(event)
-      {
-          document.getElementById('test-video').play();
       }
   </script>
 </head>