Bug 165756
| Summary: | media.webkitPresentationMode may return "inline" in a webkitpresentationmodechanged event handler after entering PiP | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Antoine Quint <graouts> |
| Component: | Media | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Antoine Quint
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.