Bug 57127 - Add ApplicationCache API to get disk usage per origin
Summary: Add ApplicationCache API to get disk usage per origin
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Anton D'Auria
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-25 15:13 PDT by Anton D'Auria
Modified: 2011-05-10 18:47 PDT (History)
4 users (show)

See Also:


Attachments
Patch (24.17 KB, patch)
2011-03-25 16:00 PDT, Anton D'Auria
no flags Details | Formatted Diff | Diff
Patch (24.12 KB, patch)
2011-03-25 17:24 PDT, Anton D'Auria
no flags Details | Formatted Diff | Diff
Patch (23.45 KB, patch)
2011-05-10 16:23 PDT, Anton D'Auria
no flags Details | Formatted Diff | Diff
Patch (24.75 KB, patch)
2011-05-10 17:27 PDT, Anton D'Auria
no flags Details | Formatted Diff | Diff
Patch (24.26 KB, patch)
2011-05-10 17:34 PDT, Anton D'Auria
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton D'Auria 2011-03-25 15:13:53 PDT
ApplicationCacheStorage already provides an API to get per-origin disk usage. This should be exposed through WebCore::ApplicationCache. And add +[WebApplicationCache diskUsageForOrigin:] to Mac port.
Comment 1 Anton D'Auria 2011-03-25 16:00:09 PDT
Created attachment 86990 [details]
Patch
Comment 2 Alexey Proskuryakov 2011-03-25 16:21:43 PDT
Comment on attachment 86990 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=86990&action=review

> Tools/DumpRenderTree/LayoutTestController.cpp:408
> +    JSRetainPtr<JSStringRef> originUrl(Adopt, JSValueToStringCopy(context, arguments[0], exception));

s/Url/URL/.

> LayoutTests/http/tests/appcache/origin-usage.html:5
> +var drtUrl = "http://127.0.0.1:8000";

You only use this constant sometimes, so I'm not sure if it helps at all.
Comment 3 Build Bot 2011-03-25 16:23:27 PDT
Attachment 86990 [details] did not build on win:
Build output: http://queues.webkit.org/results/8243752
Comment 4 Anton D'Auria 2011-03-25 17:24:03 PDT
Created attachment 86997 [details]
Patch
Comment 5 WebKit Commit Bot 2011-03-26 08:47:10 PDT
Comment on attachment 86997 [details]
Patch

Rejecting attachment 86997 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-4', 'apply-..." exit_code: 1

Last 500 characters of output:
autoinstalled/mechanize/_urllib2_fork.py", line 332, in _call_chain
    result = func(*args)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1170, in https_open
    return self.do_open(conn_factory, req)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1118, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 60] Operation timed out>

Full output: http://queues.webkit.org/results/8255523
Comment 6 Anton D'Auria 2011-03-26 09:44:06 PDT
Looks like the commit queue had a network-related issue, and c-'d the patch.
Comment 7 WebKit Commit Bot 2011-03-27 12:11:45 PDT
Comment on attachment 86997 [details]
Patch

Rejecting attachment 86997 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=eseidel-cq-sf', 'bu..." exit_code: 2

Last 500 characters of output:
........................................
traversal ......................
traversal/hixie-node-iterator ..........
userscripts ...............
webarchive .....................
webarchive/loading ....
http/tests/appcache ...........................................
http/tests/appcache/origin-usage.html -> failed

Exiting early after 1 failures. 22032 tests run.
545.80s total testing time

22031 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
14 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/8268325
Comment 8 Anton D'Auria 2011-05-10 16:23:13 PDT
Created attachment 93039 [details]
Patch

Revised description of test 7 to clearly indicate its dependence on test 6
Comment 9 Anton D'Auria 2011-05-10 16:26:26 PDT
Comment on attachment 93039 [details]
Patch

Oops! Patch for wrong bug!
Comment 10 Anton D'Auria 2011-05-10 17:27:14 PDT
Created attachment 93054 [details]
Patch

This patch is identical to the one Alexey r+ and c+, with the only difference being the layout test checking for a byte range instead of a precise byte number, since size can vary on the order of 10 bytes.
Comment 11 Anton D'Auria 2011-05-10 17:34:58 PDT
Created attachment 93055 [details]
Patch

This patch is identical to the one Alexey r+ and c+, with the only difference being the layout test checking for a byte range instead of a precise byte number, since size can vary on the order of 10 bytes.
Comment 12 WebKit Commit Bot 2011-05-10 18:41:33 PDT
The commit-queue encountered the following flaky tests while processing attachment 93055 [details]:

http/tests/misc/favicon-loads-with-icon-loading-override.html bug 58412 (author: alice.liu@apple.com)
The commit-queue is continuing to process your patch.
Comment 13 WebKit Commit Bot 2011-05-10 18:47:20 PDT
Comment on attachment 93055 [details]
Patch

Clearing flags on attachment: 93055

Committed r86204: <http://trac.webkit.org/changeset/86204>
Comment 14 WebKit Commit Bot 2011-05-10 18:47:24 PDT
All reviewed patches have been landed.  Closing bug.