Title: [213194] trunk/LayoutTests
Revision
213194
Author
commit-qu...@webkit.org
Date
2017-02-28 17:01:49 -0800 (Tue, 28 Feb 2017)

Log Message

LayoutTest media/modern-media-controls/placard-support/placard-support-airplay.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167441
<rdar://problem/30770034>

Patch by Antoine Quint <grao...@apple.com> on 2017-02-28
Reviewed by Dean Jackson.

This test would sometime fail when calling media.webkitShowPlaybackTargetPicker() due to the requirement
that the media be playable for that call to succeed. So we add an event listener for the "canplay" event
before we proceed to ensure that this call will always succeed. The fact that the media is playing is
irrelevant so we remove the "autoplay" attribute.

* media/modern-media-controls/placard-support/placard-support-airplay.html:
* platform/mac/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (213193 => 213194)


--- trunk/LayoutTests/ChangeLog	2017-03-01 00:53:52 UTC (rev 213193)
+++ trunk/LayoutTests/ChangeLog	2017-03-01 01:01:49 UTC (rev 213194)
@@ -1,3 +1,19 @@
+2017-02-28  Antoine Quint  <grao...@apple.com>
+
+        LayoutTest media/modern-media-controls/placard-support/placard-support-airplay.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=167441
+        <rdar://problem/30770034>
+
+        Reviewed by Dean Jackson.
+
+        This test would sometime fail when calling media.webkitShowPlaybackTargetPicker() due to the requirement
+        that the media be playable for that call to succeed. So we add an event listener for the "canplay" event
+        before we proceed to ensure that this call will always succeed. The fact that the media is playing is
+        irrelevant so we remove the "autoplay" attribute.
+
+        * media/modern-media-controls/placard-support/placard-support-airplay.html:
+        * platform/mac/TestExpectations:
+
 2017-02-28  Alexey Proskuryakov  <a...@apple.com>
 
         LayoutTest workers/sab/postMessage-clones.html is a flaky failure

Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html (213193 => 213194)


--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html	2017-03-01 00:53:52 UTC (rev 213193)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html	2017-03-01 01:01:49 UTC (rev 213194)
@@ -15,7 +15,7 @@
     }
     
 </style>
-<video src="" controls autoplay></video>
+<video src="" controls></video>
 <div id="host"></div>
 <script type="text/_javascript_">
 
@@ -27,11 +27,13 @@
 const media = document.querySelector("video");
 const mediaController = createControls(container, media, null);
 
-(function makeAirPlayAvailable()
+media.addEventListener("canplay", makeAirPlayAvailable);
+
+function makeAirPlayAvailable()
 {
     media.addEventListener("webkitplaybacktargetavailabilitychanged", playbackTargetAvailabilityChangedOnce, true);
     window.internals.setMockMediaPlaybackTargetPickerEnabled(true);
-})();
+}
 
 function playbackTargetAvailabilityChangedOnce(event)
 {
@@ -50,8 +52,7 @@
         return;
 
     media.removeEventListener('webkitplaybacktargetavailabilitychanged', playbackTargetAvailabilityChangedAgain, true);
-
-    window.setTimeout(enterAirPlay, 100);
+    enterAirPlay();
 }
 
 function enterAirPlay()

Modified: trunk/LayoutTests/platform/mac/TestExpectations (213193 => 213194)


--- trunk/LayoutTests/platform/mac/TestExpectations	2017-03-01 00:53:52 UTC (rev 213193)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2017-03-01 01:01:49 UTC (rev 213194)
@@ -1494,8 +1494,6 @@
 
 webkit.org/b/167396 media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html [ Pass Failure ]
 
-webkit.org/b/167441 media/modern-media-controls/placard-support/placard-support-airplay.html [ Pass Timeout ]
-
 webkit.org/b/167442 media/modern-media-controls/airplay-support/airplay-support.html [ Pass Timeout ]
 
 webkit.org/b/165874 streams/pipe-to.html [ Pass Failure ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to