Bug 159533

Summary: REGRESSION (r202918): LayoutTest media/video-main-content-allow-then-deny.html is flaky, failing almost every time on El Capitan
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, eric.carlson, jer.noble, jonlee
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=159437
Attachments:
Description Flags
Patch none

Description Ryan Haddad 2016-07-07 15:59:50 PDT
LayoutTest media/video-main-content-allow-then-deny.html failing

https://build.webkit.org/results/Apple%20El%20Capitan%20Release%20WK2%20(Tests)/r202936%20(7445)/results.html

--- /Volumes/Data/slave/elcapitan-release-tests-wk2/build/layout-test-results/media/video-main-content-allow-then-deny-expected.txt
+++ /Volumes/Data/slave/elcapitan-release-tests-wk2/build/layout-test-results/media/video-main-content-allow-then-deny-actual.txt
@@ -2,6 +2,6 @@
 EVENT(canplaythrough)
 EVENT(playing)
 RUN(video.style.visibility = "hidden")
-EVENT(pause)
+FAIL: did not end fast enough
 END OF TEST
Comment 1 Ryan Haddad 2016-07-07 16:02:29 PDT
Marked as failing in <https://trac.webkit.org/r202941>
Comment 2 Alexey Proskuryakov 2016-07-12 14:35:11 PDT
It fails almost every time on El Capitan, and it sometimes fails on Yosemite.

Looks like a regression from <http://trac.webkit.org/r202918>. Jer, could you please take a look?
Comment 3 Jer Noble 2016-07-12 16:00:41 PDT
Sure thing.
Comment 4 Jer Noble 2016-07-12 17:23:47 PDT
This test will time out if a pause event is not fired within 500ms of hiding the <video> element.  For a first pass, lets see if increasing this timeout to 1s doesn't fix this issue.
Comment 5 Jer Noble 2016-07-12 17:38:41 PDT
Nope, that's not the issue.  The problem is that the MediaElementSession's m_isMainContent is (now) being modified outside the m_mainContentCheckTimer.  Have a fix.
Comment 6 Jer Noble 2016-07-12 17:43:56 PDT
Created attachment 283478 [details]
Patch
Comment 7 WebKit Commit Bot 2016-07-14 00:55:10 PDT
Comment on attachment 283478 [details]
Patch

Clearing flags on attachment: 283478

Committed r203219: <http://trac.webkit.org/changeset/203219>
Comment 8 WebKit Commit Bot 2016-07-14 00:55:14 PDT
All reviewed patches have been landed.  Closing bug.