<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LayoutTest performance-api/performance-now-time-origin-in-worker.html is a flaky failure"
   href="https://bugs.webkit.org/show_bug.cgi?id=168005#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LayoutTest performance-api/performance-now-time-origin-in-worker.html is a flaky failure"
   href="https://bugs.webkit.org/show_bug.cgi?id=168005">bug 168005</a>
              from <span class="vcard"><a class="email" href="mailto:joepeck&#64;webkit.org" title="Joseph Pecoraro &lt;joepeck&#64;webkit.org&gt;"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=168005#c3">comment #3</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=300928&amp;action=diff" name="attach_300928" title="[PATCH] Proposed Fix">attachment 300928</a> <a href="attachment.cgi?id=300928&amp;action=edit" title="[PATCH] Proposed Fix">[details]</a></span>
&gt; [PATCH] Proposed Fix
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=300928&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=300928&amp;action=review</a>
&gt; 
&gt; &gt; LayoutTests/ChangeLog:8
&gt; &gt; +        Increase the budget from 200ms to 250ms and if it fails, log the time
&gt; 
&gt; Any timeout can take up to a couple seconds in a test, so 250 ms can never
&gt; be right.
&gt; 
&gt; What exactly is this test checking for, can it work without precise time
&gt; measurement?</span >

This is checking that the performance.now() values in a Worker are relative to their creation time and not relative to the Document's creation time.

Ultimately this is checking that the performance.now in the Worker and Page are different. Currently to do this, the test waits 200ms on the Document, spawns a Worker, and checks that performance.now in that Worker is less then 200ms. The patch above bumped this to 250ms and would log the failure time if the test fails to get an idea of how long it took.

PerformanceTiming Level 3 introduces performance.timeOrigin which would be the easier way to verify this. Then we could just send the timeOrigin back to the page and verify the difference. Currently we don't have that luxury, so the best I can come up is ensuring the different by waiting some N milliseconds on the Page before spawning the Worker to verify we can get a time below N in the Worker.</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>