Summary: | [macOS Sierra] Fix flaky test: media/controls/picture-in-picture.html | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ada Chan <adachan> | ||||
Component: | Tools / Tests | Assignee: | Ada Chan <adachan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | lforschler | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Ada Chan
2016-08-09 13:41:59 PDT
Created attachment 285672 [details]
Patch
Comment on attachment 285672 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285672&action=review > LayoutTests/media/controls/picture-in-picture.html:75 > + if (stateForPlaceholder.className.indexOf("hidden") >= 0) { > + // Use 33 to match PlaceholderPollingDelay in mediaControlsApple.js. > + setTimeout(pollPIPPlaceholderVisibilityChange, 33); > + return; > + } Nit: in case something goes wrong I think it would be better to fail and log an error message after some maximum number of retrys, rather than trying until the test times out. (In reply to comment #3) > Comment on attachment 285672 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=285672&action=review > > > LayoutTests/media/controls/picture-in-picture.html:75 > > + if (stateForPlaceholder.className.indexOf("hidden") >= 0) { > > + // Use 33 to match PlaceholderPollingDelay in mediaControlsApple.js. > > + setTimeout(pollPIPPlaceholderVisibilityChange, 33); > > + return; > > + } > > Nit: in case something goes wrong I think it would be better to fail and log > an error message after some maximum number of retrys, rather than trying > until the test times out. OK, I'll set a maximum number retrys to 10. Thanks for the review! Committed: https://trac.webkit.org/changeset/204304 Comment on attachment 285672 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285672&action=review >>> LayoutTests/media/controls/picture-in-picture.html:75 >>> + } >> >> Nit: in case something goes wrong I think it would be better to fail and log an error message after some maximum number of retrys, rather than trying until the test times out. > > OK, I'll set a maximum number retrys to 10. > > Thanks for the review! 10 retries is just 330 ms. I suggest waiting ~10 seconds before failing. (In reply to comment #6) > Comment on attachment 285672 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=285672&action=review > > >>> LayoutTests/media/controls/picture-in-picture.html:75 > >>> + } > >> > >> Nit: in case something goes wrong I think it would be better to fail and log an error message after some maximum number of retrys, rather than trying until the test times out. > > > > OK, I'll set a maximum number retrys to 10. > > > > Thanks for the review! > > 10 retries is just 330 ms. I suggest waiting ~10 seconds before failing. The placeholder is not guaranteed to be visible right when the presentation mode changes but it should be visible basically very soon after. If it takes in the order of seconds to become visible, then that's a bug. |