Bug 165756

Summary: media.webkitPresentationMode may return "inline" in a webkitpresentationmodechanged event handler after entering PiP
Product: WebKit Reporter: Antoine Quint <graouts>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: graouts, jeremyj-wk, jer.noble, jonlee, webkit-bug-importer
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Antoine Quint
Reported 2016-12-12 06:55:28 PST
The test at media/modern-media-controls/pip-support/pip-support-click.html is flaky due to "media.webkitPresentationMode" sometimes returning "inline" within a "webkitpresentationmodechanged" event handler after entering PiP. To reproduce, try to run this command: Tools/Scripts/run-webkit-tests --release --time-out-ms=5000 --no-sample-on-timeout --exit-after-n-failures=1 --iterations=200 media/modern-media-controls/pip-support/pip-support-click.html Adding a short timeout works around the problem: media.addEventListener("webkitpresentationmodechanged", () => { setTimeout(() => { shouldBeEqualToString("media.webkitPresentationMode", "picture-in-picture"); container.remove(); media.remove(); finishJSTest(); }, 10); });
Attachments
Antoine Quint
Comment 1 2016-12-13 06:26:57 PST
I now think the test in question was causing the issue as it could end up clicking on the media controls PiP button twice and thus forcing the controls to go from inline to PiP and back to inline.
Note You need to log in before you can comment on or make changes to this bug.