RESOLVED FIXED 47311
Add layout tests for Entry.getMetadata (FileSystem API)
https://bugs.webkit.org/show_bug.cgi?id=47311
Summary Add layout tests for Entry.getMetadata (FileSystem API)
Kinuko Yasuda
Reported 2010-10-06 15:49:27 PDT
Add layout tests for Entry.getMetadata (FileSystem API)
Attachments
Patch (7.47 KB, patch)
2010-10-21 13:34 PDT, Kinuko Yasuda
no flags
Patch (10.06 KB, patch)
2010-12-07 18:26 PST, Kinuko Yasuda
no flags
Patch (10.03 KB, patch)
2010-12-13 13:56 PST, Kinuko Yasuda
levin: review+
Kinuko Yasuda
Comment 1 2010-10-21 13:34:10 PDT
Jian Li
Comment 2 2010-11-29 21:28:39 PST
Comment on attachment 71481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=71481&action=review > LayoutTests/fast/filesystem/resources/op-tests-helper.js:223 > + var entryMetadataString = 'this.environment["' + symbol + '"]'; Might be better to make 'this.environment["' + symbol + '"]' a helper function in order to simplify the code. > LayoutTests/fast/filesystem/resources/op-tests-helper.js:230 > + this.errorCallback(); Probably we should continue to run next test even we fail the current test unless we encounter a severe error that cannot be recoverable, > LayoutTests/fast/filesystem/resources/op-tests-helper.js:232 > + }; '}' not aligned correctly. > LayoutTests/fast/filesystem/resources/op-tests-helper.js:324 > + }; ditto. > LayoutTests/fast/filesystem/resources/op-tests-helper.js:331 > + // Record rounded start date (current time minus 999 msec) here for the comparison. Entry.getMetadata() may return motd in seconds accuracy while new Date() is milliseconds accuracy. What is motd?
Eric U.
Comment 3 2010-11-30 17:05:07 PST
Comment on attachment 71481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=71481&action=review >> LayoutTests/fast/filesystem/resources/op-tests-helper.js:331 >> + // Record rounded start date (current time minus 999 msec) here for the comparison. Entry.getMetadata() may return motd in seconds accuracy while new Date() is milliseconds accuracy. > > What is motd? Why would getMetadata be so inaccurate? Is that a filesystem limitation or part of our implementation?
Kinuko Yasuda
Comment 4 2010-12-01 11:39:33 PST
(In reply to comment #3) > (From update of attachment 71481 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=71481&action=review > > >> LayoutTests/fast/filesystem/resources/op-tests-helper.js:331 > >> + // Record rounded start date (current time minus 999 msec) here for the comparison. Entry.getMetadata() may return motd in seconds accuracy while new Date() is milliseconds accuracy. > > > > What is motd? Ouch I think I meant mod time (last modification time). Will fix in the next patch. > Why would getMetadata be so inaccurate? Is that a filesystem limitation or part of our implementation? It's due to our implementation (at least for chromium). We use WebFileInfo structure defined in WebKit API for filling metadata and WebFileInfo.modificationTime is defined as "The last modification time of the file, in seconds." We can fix it but it'll need two-sided patch.
Eric U.
Comment 5 2010-12-01 12:46:37 PST
(In reply to comment #4) > (In reply to comment #3) > > (From update of attachment 71481 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=71481&action=review > > > > >> LayoutTests/fast/filesystem/resources/op-tests-helper.js:331 > > >> + // Record rounded start date (current time minus 999 msec) here for the comparison. Entry.getMetadata() may return motd in seconds accuracy while new Date() is milliseconds accuracy. > > > > > > What is motd? > > Ouch I think I meant mod time (last modification time). Will fix in the next patch. > > > Why would getMetadata be so inaccurate? Is that a filesystem limitation or part of our implementation? > > It's due to our implementation (at least for chromium). > We use WebFileInfo structure defined in WebKit API for filling metadata and WebFileInfo.modificationTime is defined as "The last modification time of the file, in seconds." > We can fix it but it'll need two-sided patch. Well, there's no requirement that it be any more accurate than that. I was just curious.
Kinuko Yasuda
Comment 6 2010-12-07 18:26:36 PST
Kinuko Yasuda
Comment 7 2010-12-07 18:28:48 PST
Comment on attachment 71481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=71481&action=review >> LayoutTests/fast/filesystem/resources/op-tests-helper.js:223 >> + var entryMetadataString = 'this.environment["' + symbol + '"]'; > > Might be better to make 'this.environment["' + symbol + '"]' a helper function in order to simplify the code. Done. >> LayoutTests/fast/filesystem/resources/op-tests-helper.js:230 >> + this.errorCallback(); > > Probably we should continue to run next test even we fail the current test unless we encounter a severe error that cannot be recoverable, Done. >> LayoutTests/fast/filesystem/resources/op-tests-helper.js:232 >> + }; > > '}' not aligned correctly. Fixed. >> LayoutTests/fast/filesystem/resources/op-tests-helper.js:324 >> + }; > > ditto. Fixed. >>>>> LayoutTests/fast/filesystem/resources/op-tests-helper.js:331 >>>>> + // Record rounded start date (current time minus 999 msec) here for the comparison. Entry.getMetadata() may return motd in seconds accuracy while new Date() is milliseconds accuracy. >>>> >>>> What is motd? >>> >>> Why would getMetadata be so inaccurate? Is that a filesystem limitation or part of our implementation? >> >> Ouch I think I meant mod time (last modification time). Will fix in the next patch. > > Well, there's no requirement that it be any more accurate than that. I was just curious. Fixed the comment.
WebKit Review Bot
Comment 8 2010-12-07 21:58:44 PST
Attachment 75859 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/update-webkit']" exit_code: 2 Updating OpenSource Incomplete data: Delta source ended unexpectedly at /usr/lib/git-core/git-svn line 5061 Died at WebKitTools/Scripts/update-webkit line 132. If any of these errors are false positives, please file a bug against check-webkit-style.
Kinuko Yasuda
Comment 9 2010-12-13 13:56:12 PST
Created attachment 76433 [details] Patch Rebased.
Kinuko Yasuda
Comment 10 2011-01-06 23:07:52 PST
Note You need to log in before you can comment on or make changes to this bug.