Summary: | Add layout tests for Entry.getMetadata (FileSystem API) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kinuko Yasuda <kinuko> | ||||||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | ericu, levin, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
Kinuko Yasuda
2010-10-06 15:49:27 PDT
Created attachment 71481 [details]
Patch
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? 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? (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. (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. Created attachment 75859 [details]
Patch
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. 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.
Created attachment 76433 [details]
Patch
Rebased.
Committed r75232: <http://trac.webkit.org/changeset/75232> |