[Mac] AirPlay fails if target is set before AVPlayer has been created
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2016 22:40:05 +0000 (22:40 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2016 22:40:05 +0000 (22:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157147
<rdar://problem/24197592>

Unreviewed, update test so the results are consistent on different machines.

* media/media-source/media-source-airplay-expected.txt:
* media/media-source/media-source-airplay.html:

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

LayoutTests/ChangeLog
LayoutTests/media/media-source/media-source-airplay-expected.txt
LayoutTests/media/media-source/media-source-airplay.html

index c208a5e..e32d649 100644 (file)
@@ -1,3 +1,14 @@
+2016-04-29  Eric Carlson  <eric.carlson@apple.com>
+
+        [Mac] AirPlay fails if target is set before AVPlayer has been created
+        https://bugs.webkit.org/show_bug.cgi?id=157147
+        <rdar://problem/24197592>
+
+        Unreviewed, update test so the results are consistent on different machines.
+
+        * media/media-source/media-source-airplay-expected.txt:
+        * media/media-source/media-source-airplay.html:
+
 2016-04-29  Antonio Gomes  <tonikitoo@webkit.org>
 
         <select multiple> padding should react when scrolling
index 3986627..a3de395 100644 (file)
@@ -3,7 +3,6 @@
 RUN(source = new MediaSource())
 RUN(source.addEventListener('sourceopen', startLoad))
 RUN(video.src = URL.createObjectURL(source))
-EVENT( webkitplaybacktargetavailabilitychanged ) : event.availability = 'not-available'
 
 ** create a source buffer, add an init segment with 1 video track
 RUN(sourceBuffer = source.addSourceBuffer('video/mock; codecs="mock"'))
@@ -13,10 +12,10 @@ RUN(sourceBuffer.appendBuffer(init))
 EVENT(canplaythrough)
 
 ** simulate choosing a device from the menu
-EVENT( webkitplaybacktargetavailabilitychanged ) : event.availability = 'available'
 
 ** change video.src to one that supports AirPlay
 EXPECTED (video.webkitCurrentPlaybackTargetIsWireless == 'true') OK
+EXPECTED (wirelessPlaybackTargetAvailability == 'available') OK
 
 END OF TEST
 
index 687e898..aaa54cf 100644 (file)
@@ -11,7 +11,7 @@
     var requestLength = 200000;
     var nextRequest = 0;
     var totalLength = 100;
-    var previousAvailable = '';
+    var wirelessPlaybackTargetAvailability = '';
 
     if (window.internals) {
         internals.initializeMockMediaSource();
@@ -69,7 +69,8 @@
     function currentTargetChanged()
     {
         if (video.src.indexOf("/test.") > 0) {
-            testExpected("video.webkitCurrentPlaybackTargetIsWireless", true);
+            testExpected('video.webkitCurrentPlaybackTargetIsWireless', true);
+            testExpected('wirelessPlaybackTargetAvailability', 'available');
             consoleWrite('');
             endTest();
             return;
 
     function targetAvailabilityChanged(event)
     {
-        if (previousAvailable == event.availability)
-            return;
-
-        consoleWrite(`EVENT( ${event.type} ) : event.availability = '${event.availability}'`);
-        previousAvailable = event.availability;
+        wirelessPlaybackTargetAvailability = event.availability;
     }
     
     </script>