<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>156994</bug_id>
          
          <creation_ts>2016-04-25 13:56:19 -0700</creation_ts>
          <short_desc>http/tests/local/fileapi/file-last-modified-after-delete.html is flaky on mac-wk1 after r200032</short_desc>
          <delta_ts>2016-04-25 17:12:07 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>154968</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryan Haddad">ryanhaddad</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1187047</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2016-04-25 13:56:19 -0700</bug_when>
    <thetext>http/tests/local/fileapi/file-last-modified-after-delete.html is flaky on mac-wk1 after &lt;https://trac.webkit.org/changeset/200032&gt;

Most recent failure:
&lt;https://build.webkit.org/results/Apple%20Yosemite%20Release%20WK1%20(Tests)/r200041%20(14081)/results.html&gt;

Flakiness dashboard:
&lt;http://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&amp;tests=http%2Ftests%2Flocal%2Ffileapi%2Ffile-last-modified-after-delete.html&gt;

--- /Volumes/Data/slave/yosemite-release-tests-wk1/build/layout-test-results/http/tests/local/fileapi/file-last-modified-after-delete-expected.txt
+++ /Volumes/Data/slave/yosemite-release-tests-wk1/build/layout-test-results/http/tests/local/fileapi/file-last-modified-after-delete-actual.txt
@@ -6,7 +6,7 @@
 PASS event.dataTransfer contains a File object on drop.
 PASS lastModified is not null
 PASS lastModified is &gt;= testStartTime.getTime()
-PASS (new Date()).getTime() is &gt;= lastModified
+FAIL (new Date()).getTime() should be &gt;= lastModified. Was 1461615786287 (of type number).
 PASS successfullyParsed is true
 
 TEST COMPLETE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1187057</commentid>
    <comment_count>1</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-04-25 14:12:29 -0700</bug_when>
    <thetext>I have a clean tree, will look now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1187066</commentid>
    <comment_count>2</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-04-25 14:38:28 -0700</bug_when>
    <thetext>Attempt to fix in http://trac.webkit.org/changeset/200051</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1187096</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-04-25 15:57:52 -0700</bug_when>
    <thetext>I think I see what&apos;s going on here.

The File.lastModified accessor is returning a fractional number of milliseconds since the epoch.
e.g., 1461624859783.417

Then the test end date is rounded to an integer number of milliseconds since epoch.
e.g., 1461624859788

Those could very easily conflict the wrong way.
e.g. 1461624859783.241 and 1461624859783.0 (1461624859783.49 rounded down)

Gotta do the rounding on the File&apos;s return value.

What&apos;s entirely unclear to me is how my change actually affected this. This should&apos;ve been an existing problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1187098</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-04-25 16:00:20 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; I think I see what&apos;s going on here.
&gt; 
&gt; The File.lastModified accessor is returning a fractional number of
&gt; milliseconds since the epoch.
&gt; e.g., 1461624859783.417
&gt; 
&gt; Then the test end date is rounded to an integer number of milliseconds since
&gt; epoch.
&gt; e.g., 1461624859788
&gt; 
&gt; Those could very easily conflict the wrong way.
&gt; e.g. 1461624859783.241 and 1461624859783.0 (1461624859783.49 rounded down)
&gt; 
&gt; Gotta do the rounding on the File&apos;s return value.
&gt; 
&gt; What&apos;s entirely unclear to me is how my change actually affected this. This
&gt; should&apos;ve been an existing problem.

Never mind - it is entirely clear!

lastModifiedDate used to be a Date object, which takes care of this.
lastModified is a double, which does not.

Fixing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1187132</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-04-25 17:12:07 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/200061</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>