Bug 170620 - REGRESSION: LayoutTest media/controls/pip-placeholder-without-video-controls.html is a flaky failure
Summary: REGRESSION: LayoutTest media/controls/pip-placeholder-without-video-controls....
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-07 14:53 PDT by Ryan Haddad
Modified: 2018-05-22 12:36 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2017-04-07 14:53:14 PDT
LayoutTest media/controls/pip-placeholder-without-video-controls.html is a flaky failure

https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/r215094%20(498)/results.html

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=media%2Fcontrols%2Fpip-placeholder-without-video-controls.html

--- /Volumes/Data/slave/sierra-release-tests-wk2/build/layout-test-results/media/controls/pip-placeholder-without-video-controls-expected.txt
+++ /Volumes/Data/slave/sierra-release-tests-wk2/build/layout-test-results/media/controls/pip-placeholder-without-video-controls-actual.txt
@@ -10,7 +10,7 @@
 EVENT: webkitpresentationmodechanged
 PASS: Should be in pip mode
 PASS: Inline placeholder should be visible at this point
-PASS: Inline placeholder should have the 'picture-in-picture' class
+FAIL: Inline placeholder should have the 'picture-in-picture' class Expected to contain "picture-in-picture". Actual: "appletv"
 
 Testing finished.
Comment 1 Ryan Haddad 2017-04-07 14:53:39 PDT
This is limited to the Sierra Release WK2 bots according to flakiness dashboard.
Comment 2 Ryan Haddad 2018-04-13 16:38:40 PDT
(In reply to Ryan Haddad from comment #1)
> This is limited to the Sierra Release WK2 bots according to flakiness
> dashboard.
It looks like the test is also flaky on High Sierra Release WK2, too (though it doesn't fail nearly as often as it does on Sierra).
Comment 3 Radar WebKit Bug Importer 2018-05-01 14:35:04 PDT
<rdar://problem/39879021>
Comment 4 Ryan Haddad 2018-05-03 12:42:43 PDT
Marked test as flaky in https://trac.webkit.org/r231320
Comment 5 Antoine Quint 2018-05-22 08:27:38 PDT
On Sierra, I get a reproducible failure with this command:

run-webkit-tests --release media/controls/airplay-picker.html media/controls/pip-placeholder-without-video-controls.html --force
Comment 6 Antoine Quint 2018-05-22 08:45:58 PDT
The diff definitely points at the media being in AirPlay mode since it has an "appletv" class. So it's a matter of a previous test making this test run in AirPlay still.
Comment 7 Antoine Quint 2018-05-22 11:56:17 PDT
Even after setMockMediaPlaybackTargetPickerState(emptyString(), MediaPlaybackTargetContext::Unknown) has been called by Internals::resetToConsistentState() and WebMediaSessionManager::setMockMediaPlaybackTargetPickerState() has received the message from the UI process, which means the state has been reset as expected, the failing test will receive a "webkitcurrentplaybacktargetiswirelesschanged" event and video.webkitCurrentPlaybackTargetIsWireless will be set to true. As such the test thinks it's Airplaying and showing the wrong message.
Comment 8 Antoine Quint 2018-05-22 12:24:47 PDT
Even when the test passes, div[pseudo='-webkit-media-controls-wireless-playback-status'].className is "picture-in-picture appletv", which makes no sense to me. It should be one or the other…
Comment 9 Antoine Quint 2018-05-22 12:36:11 PDT
The crux of the problem is that HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged() is called with the media in the wrong state and this causes the test to act as it's AirPlaying.