WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160707
[macOS Sierra] Fix flaky test: media/controls/picture-in-picture.html
https://bugs.webkit.org/show_bug.cgi?id=160707
Summary
[macOS Sierra] Fix flaky test: media/controls/picture-in-picture.html
Ada Chan
Reported
2016-08-09 13:41:59 PDT
media/controls/picture-in-picture.html is flaky on macOS Sierra. @@ -21,13 +21,13 @@ Test for the pip placeholder visibility in pip mode PASS: Should be in pip mode -PASS: Inline placeholder should be visible at this point +FAIL: Inline placeholder should be visible at this point Expected to not contain "hidden". Actual: "hidden picture-in-picture" Test for the pip placeholder visibility in pip mode without a 'controls' attribute PASS: Should still be in pip mode PASS: No controls attribute -PASS: Inline placeholder should still be visible +FAIL: Inline placeholder should still be visible Expected to not contain "hidden". Actual: "hidden picture-in-picture" Testing finished. 
Attachments
Patch
(3.21 KB, patch)
2016-08-09 13:52 PDT
,
Ada Chan
eric.carlson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ada Chan
Comment 1
2016-08-09 13:42:21 PDT
<
rdar://problem/27574303
>
Ada Chan
Comment 2
2016-08-09 13:52:47 PDT
Created
attachment 285672
[details]
Patch
Eric Carlson
Comment 3
2016-08-09 14:34:22 PDT
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.
Ada Chan
Comment 4
2016-08-09 14:54:29 PDT
(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!
Ada Chan
Comment 5
2016-08-09 14:57:11 PDT
Committed:
https://trac.webkit.org/changeset/204304
Alexey Proskuryakov
Comment 6
2016-08-09 20:44:05 PDT
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.
Ada Chan
Comment 7
2016-08-26 13:20:10 PDT
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug