<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide.html is flaky"
   href="https://bugs.webkit.org/show_bug.cgi?id=167263#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide.html is flaky"
   href="https://bugs.webkit.org/show_bug.cgi?id=167263">bug 167263</a>
              from <span class="vcard"><a class="email" href="mailto:graouts&#64;apple.com" title="Antoine Quint &lt;graouts&#64;apple.com&gt;"> <span class="fn">Antoine Quint</span></a>
</span></b>
        <pre>OK, I think I understand what makes this test flaky.

First, the test makes the assumption that the auto-hide timer can only be started as a result of the &quot;play&quot; event firing… but it turns out that when &quot;loadedmetadata&quot; fires, media.paused can be set to &quot;false&quot;, and ControlsVisibilitySupport which governs when the controls bar is set to have fadesWhileIdle = true, uses both &quot;loadedmetadata&quot; and &quot;play&quot; as triggers provided media.paused = &quot;false&quot;. So that's the first issue, since we could potentially wait enough time until we'd assume the auto-hide timer started to make our 200ms and 300ms timers off-base enough.

Second, while the system is under stress (in my case I have a full WK build and running the test with GuardMalloc), there might be a significant delta between the moment the same event is handled within the media controls code and when it's handled in the test. Locally, I can see something around 85ms as the delay. This would cause another significant delay to make the 200ms and 300ms timers off-base.

So this test is definitely flaky by nature, and all of the other auto-hide tests, many of which are showing flakiness, suffer from the same design flaw. I'll need to think of a better, more robust way to write those tests.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>