Address flaky airplay-* LayouTests
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2016 17:17:41 +0000 (17:17 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2016 17:17:41 +0000 (17:17 +0000)
commit5491b8e746e8b7cf67d66a4a2ea47b1bd3b24d51
tree0076114abb2d9bba1fd2bf60d9247ff24384d168
parent9328769b73d11087cd3aa1e3c3ec3645e4531682
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/airplay-autoplay.html
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/testing/Internals.cpp