Title: [207005] trunk
- Revision
- 207005
- Author
- jer.no...@apple.com
- Date
- 2016-10-10 10:17:41 -0700 (Mon, 10 Oct 2016)
Log Message
Address flaky airplay-* LayouTests
https://bugs.webkit.org/show_bug.cgi?id=163044
Reviewed by Brent Fulgham.
Source/WebCore:
Two separate problems conspired to make airplay tests a bit flaky:
For one, when the HTMLMediaElement clears its MediaPlayer, it won't necessarily notify
clients that it has stopped playing to a wireless target. The WebMediaSessionManager may
eventually cause this value to reset, but it's asynchronous, and may fire after the next
test starts. Reset this state explicitly.
For two, the state of the mock playback target picker was not being reset between test
invocations.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
LayoutTests:
* media/airplay-autoplay.html:
* platform/mac/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (207004 => 207005)
--- trunk/LayoutTests/ChangeLog 2016-10-10 17:12:34 UTC (rev 207004)
+++ trunk/LayoutTests/ChangeLog 2016-10-10 17:17:41 UTC (rev 207005)
@@ -1,3 +1,13 @@
+2016-10-10 Jer Noble <jer.no...@apple.com>
+
+ Address flaky airplay-* LayouTests
+ https://bugs.webkit.org/show_bug.cgi?id=163044
+
+ Reviewed by Brent Fulgham.
+
+ * media/airplay-autoplay.html:
+ * platform/mac/TestExpectations:
+
2016-10-10 Ryan Haddad <ryanhad...@apple.com>
Marking http/tests/xmlhttprequest/onabort-response-getters.html as flaky on ios-simulator.
Modified: trunk/LayoutTests/media/airplay-autoplay.html (207004 => 207005)
--- trunk/LayoutTests/media/airplay-autoplay.html 2016-10-10 17:12:34 UTC (rev 207004)
+++ trunk/LayoutTests/media/airplay-autoplay.html 2016-10-10 17:17:41 UTC (rev 207005)
@@ -8,11 +8,6 @@
var phase = 'video-1';
- if (window.internals) {
- internals.setMockMediaPlaybackTargetPickerEnabled(true);
- internals.setMockMediaPlaybackTargetPickerState('', 'Unknown');
- }
-
function start()
{
findMediaElement();
@@ -31,10 +26,8 @@
runWithKeyDown(function() {
run(`video.webkitShowPlaybackTargetPicker()`);
setTimeout(function() {
- if (window.internals) {
- internals.setMockMediaPlaybackTargetPickerEnabled(true);
+ if (window.internals)
internals.setMockMediaPlaybackTargetPickerState('Sleepy TV', 'DeviceAvailable');
- }
}, 100);
});
video.currentTime = video.duration - 1;
Modified: trunk/LayoutTests/platform/mac/TestExpectations (207004 => 207005)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-10-10 17:12:34 UTC (rev 207004)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-10-10 17:17:41 UTC (rev 207005)
@@ -1160,9 +1160,6 @@
# See also: rdar://problem/27356144
webkit.org/b/142726 fast/images/animated-png.html [ Skip ]
-# Fails when an actual AppleTV is nearby.
-webkit.org/b/148912 [ ElCapitan+ ] media/controls/airplay-picker.html [ Pass Failure ]
-
# OS X 10.10.3+ has the necessary glyphs.
webkit.org/b/142548 [ Yosemite+ ] editing/selection/extend-by-character-007.html [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (207004 => 207005)
--- trunk/Source/WebCore/ChangeLog 2016-10-10 17:12:34 UTC (rev 207004)
+++ trunk/Source/WebCore/ChangeLog 2016-10-10 17:17:41 UTC (rev 207005)
@@ -1,3 +1,25 @@
+2016-10-10 Jer Noble <jer.no...@apple.com>
+
+ Address flaky airplay-* LayouTests
+ https://bugs.webkit.org/show_bug.cgi?id=163044
+
+ Reviewed by Brent Fulgham.
+
+ Two separate problems conspired to make airplay tests a bit flaky:
+
+ For one, when the HTMLMediaElement clears its MediaPlayer, it won't necessarily notify
+ clients that it has stopped playing to a wireless target. The WebMediaSessionManager may
+ eventually cause this value to reset, but it's asynchronous, and may fire after the next
+ test starts. Reset this state explicitly.
+
+ For two, the state of the mock playback target picker was not being reset between test
+ invocations.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::clearMediaPlayer):
+ * testing/Internals.cpp:
+ (WebCore::Internals::resetToConsistentState):
+
2016-10-10 Brent Fulgham <bfulg...@apple.com>
Correct typo in comment (patining -> painting).
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (207004 => 207005)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-10-10 17:12:34 UTC (rev 207004)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-10-10 17:17:41 UTC (rev 207005)
@@ -5048,6 +5048,11 @@
// doesn't support playback to a target.
enqueuePlaybackTargetAvailabilityChangedEvent();
}
+
+ if (m_isPlayingToWirelessTarget) {
+ m_isPlayingToWirelessTarget = false;
+ scheduleEvent(eventNames().webkitcurrentplaybacktargetiswirelesschangedEvent);
+ }
#endif
if (m_isWaitingUntilMediaCanStart) {
Modified: trunk/Source/WebCore/testing/Internals.cpp (207004 => 207005)
--- trunk/Source/WebCore/testing/Internals.cpp 2016-10-10 17:12:34 UTC (rev 207004)
+++ trunk/Source/WebCore/testing/Internals.cpp 2016-10-10 17:17:41 UTC (rev 207005)
@@ -408,6 +408,11 @@
MockContentFilterSettings::reset();
#endif
+#if ENABLE(WIRELESS_PLAYBACK_TARGET)
+ page.setMockMediaPlaybackTargetPickerEnabled(true);
+ page.setMockMediaPlaybackTargetPickerState(emptyString(), MediaPlaybackTargetContext::Unknown);
+#endif
+
page.setShowAllPlugins(false);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes