Changeset 86204 in webkit
- Timestamp:
- May 10, 2011 6:47:03 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86192 r86204 1 2011-05-10 Anton D'Auria <adauria@apple.com> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Add ApplicationCache API to get disk usage per origin 6 https://bugs.webkit.org/show_bug.cgi?id=57127 7 8 * http/tests/appcache/origin-usage-expected.txt: Added. 9 * http/tests/appcache/origin-usage.html: Added. 10 * http/tests/appcache/resources/origin-usage-iframe-1.html: Added. 11 * http/tests/appcache/resources/origin-usage-iframe-1.manifest: Added. 12 * http/tests/appcache/resources/origin-usage-iframe-2.html: Added. 13 * http/tests/appcache/resources/origin-usage-iframe-2.manifest: Added. 14 * platform/chromium/test_expectations.txt: 15 * platform/gtk/Skipped: 16 * platform/mac-wk2/Skipped: 17 * platform/qt/Skipped: 18 1 19 2011-05-10 Adam Klein <adamk@chromium.org> 2 20 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r86171 r86204 1804 1804 // LayoutTestController::getOriginsWithApplicationCache isn't implemented 1805 1805 BUGWK SKIP : http/tests/appcache/origins-with-appcache.html = FAIL 1806 // LayoutTestController::applicationCacheDiskUsageForOrigin isn't implemented - https://bugs.webkit.org/show_bug.cgi?id=57127 1807 BUGWK SKIP : http/tests/appcache/origin-usage.html = FAIL 1806 1808 1807 1809 // New failures from WebKit r51577 -
trunk/LayoutTests/platform/gtk/Skipped
r86086 r86204 511 511 http/tests/appcache/origin-delete.html 512 512 http/tests/appcache/origins-with-appcache.html 513 # LayoutTestController::applicationCacheDiskUsageForOrigin isn't implemented - https://bugs.webkit.org/show_bug.cgi?id=57127 514 http/tests/appcache/origin-usage.html 513 515 http/tests/cookies/double-quoted-value-with-semi-colon.html 514 516 http/tests/loading/bad-scheme-subframe.html -
trunk/LayoutTests/platform/mac-wk2/Skipped
r86146 r86204 957 957 fast/text/zero-font-size.html 958 958 http/tests/appcache/disabled.html 959 # LayoutTestController::applicationCacheDiskUsageForOrigin isn't implemented - https://bugs.webkit.org/show_bug.cgi?id=57127 960 http/tests/appcache/origin-usage.html 959 961 http/tests/canvas/webgl/origin-clean-conformance.html 960 962 http/tests/inspector/network/ping.html -
trunk/LayoutTests/platform/qt/Skipped
r86143 r86204 2366 2366 # LayoutTestController::getOriginsWithApplicationCache is not implemented 2367 2367 http/tests/appcache/origins-with-appcache.html 2368 # LayoutTestController::applicationCacheDiskUsageForOrigin isn't implemented - https://bugs.webkit.org/show_bug.cgi?id=57127 2369 http/tests/appcache/origin-usage.html 2368 2370 2369 2371 # Needs rebaseline -
trunk/Source/WebCore/ChangeLog
r86200 r86204 1 2011-05-10 Anton D'Auria <adauria@apple.com> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Add ApplicationCache API to get disk usage per origin 6 https://bugs.webkit.org/show_bug.cgi?id=57127 7 8 ApplicationCacheStorage already provides an API to get per-origin 9 disk usage. This should be exposed through WebCore::ApplicationCache 10 to not be dependent on storage implementation. 11 12 Test: http/tests/appcache/origin-usage.html 13 14 * WebCore.exp.in: 15 * loader/appcache/ApplicationCache.cpp: 16 (WebCore::ApplicationCache::diskUsageForOrigin): 17 * loader/appcache/ApplicationCache.h: 18 1 19 2011-05-10 Pratik Solanki <psolanki@apple.com> 2 20 -
trunk/Source/WebCore/WebCore.exp.in
r86184 r86204 1832 1832 1833 1833 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 1834 __ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE 1834 1835 __ZN7WebCore16ApplicationCache20deleteCacheForOriginEPNS_14SecurityOriginE 1835 1836 __ZN7WebCore23ApplicationCacheStorage14quotaForOriginEPKNS_14SecurityOriginERx -
trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp
r81557 r86204 207 207 } 208 208 } 209 209 210 int64_t ApplicationCache::diskUsageForOrigin(SecurityOrigin* origin) 211 { 212 int64_t usage = 0; 213 cacheStorage().usageForOrigin(origin, usage); 214 return usage; 215 } 216 210 217 #ifndef NDEBUG 211 218 void ApplicationCache::dump() -
trunk/Source/WebCore/loader/appcache/ApplicationCache.h
r81557 r86204 93 93 static bool requestIsHTTPOrHTTPSGet(const ResourceRequest&); 94 94 95 static int64_t diskUsageForOrigin(SecurityOrigin*); 96 95 97 int64_t estimatedSizeInStorage() const { return m_estimatedSizeInStorage; } 96 98 -
trunk/Source/WebKit/mac/ChangeLog
r86184 r86204 1 2011-05-10 Anton D'Auria <adauria@apple.com> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Add ApplicationCache API to get disk usage per origin 6 https://bugs.webkit.org/show_bug.cgi?id=57127 7 8 Added Mac port API. 9 10 * WebCoreSupport/WebApplicationCache.h: 11 * WebCoreSupport/WebApplicationCache.mm: 12 (+[WebApplicationCache diskUsageForOrigin:]): 13 1 14 2011-05-10 Beth Dakin <bdakin@apple.com> 2 15 -
trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.h
r81733 r86204 36 36 + (void)setDefaultOriginQuota:(long long)size; 37 37 38 + (long long)diskUsageForOrigin:(WebSecurityOrigin *)origin; 39 38 40 + (void)deleteAllApplicationCaches; 39 41 + (void)deleteCacheForOrigin:(WebSecurityOrigin *)origin; -
trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
r81733 r86204 59 59 } 60 60 61 + (long long)diskUsageForOrigin:(WebSecurityOrigin *)origin 62 { 63 return ApplicationCache::diskUsageForOrigin([origin _core]); 64 } 65 61 66 + (void)deleteAllApplicationCaches 62 67 { -
trunk/Tools/ChangeLog
r86203 r86204 1 2011-05-10 Anton D'Auria <adauria@apple.com> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Add ApplicationCache API to get disk usage per origin 6 https://bugs.webkit.org/show_bug.cgi?id=57127 7 8 Added test that loads two frames with ~15Kb image, checks usage, 9 deletes app cache, verifies usage is 0. 10 11 * DumpRenderTree/LayoutTestController.cpp: 12 (applicationCacheDiskUsageForOriginCallback): 13 (LayoutTestController::staticFunctions): 14 * DumpRenderTree/LayoutTestController.h: 15 * DumpRenderTree/chromium/LayoutTestController.cpp: Added stub. 16 (LayoutTestController::LayoutTestController): 17 (LayoutTestController::applicationCacheDiskUsageForOrigin): 18 * DumpRenderTree/chromium/LayoutTestController.h: 19 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Added stub. 20 (LayoutTestController::applicationCacheDiskUsageForOrigin): 21 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 22 (LayoutTestController::applicationCacheDiskUsageForOrigin): 23 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: Added stub. 24 (LayoutTestController::applicationCacheDiskUsageForOrigin): 25 * DumpRenderTree/qt/LayoutTestControllerQt.h: 26 * DumpRenderTree/win/LayoutTestControllerWin.cpp: Added stub. 27 (LayoutTestController::applicationCacheDiskUsageForOrigin): 28 1 29 2011-05-10 Lucas De Marchi <lucas.demarchi@profusion.mobi> 2 30 -
trunk/Tools/DumpRenderTree/LayoutTestController.cpp
r86047 r86204 421 421 } 422 422 423 static JSValueRef applicationCacheDiskUsageForOriginCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 424 { 425 if (argumentCount < 1) 426 return JSValueMakeUndefined(context); 427 428 JSRetainPtr<JSStringRef> originURL(Adopt, JSValueToStringCopy(context, arguments[0], exception)); 429 ASSERT(!*exception); 430 431 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 432 433 return JSValueMakeNumber(context, controller->applicationCacheDiskUsageForOrigin(originURL.get())); 434 } 435 423 436 static JSValueRef originsWithApplicationCacheCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 424 437 { … … 2222 2235 { "apiTestNewWindowDataLoadBaseURL", apiTestNewWindowDataLoadBaseURLCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2223 2236 { "apiTestGoToCurrentBackForwardItem", apiTestGoToCurrentBackForwardItemCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2237 { "applicationCacheDiskUsageForOrigin", applicationCacheDiskUsageForOriginCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2224 2238 { "callShouldCloseOnWebView", callShouldCloseOnWebViewCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2225 2239 { "clearAllApplicationCaches", clearAllApplicationCachesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/LayoutTestController.h
r86047 r86204 65 65 bool findString(JSContextRef, JSStringRef, JSObjectRef optionsArray); 66 66 JSValueRef originsWithApplicationCache(JSContextRef); 67 long long applicationCacheDiskUsageForOrigin(JSStringRef name); 67 68 bool isCommandEnabled(JSStringRef name); 68 69 void keepWebHistory(); -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
r86201 r86204 194 194 bindMethod("accessStoredWebScriptObject", &LayoutTestController::accessStoredWebScriptObject); 195 195 bindMethod("addDisallowedURL", &LayoutTestController::addDisallowedURL); 196 bindMethod("applicationCacheDiskUsageForOrigin", &LayoutTestController::applicationCacheDiskUsageForOrigin); 196 197 bindMethod("callShouldCloseOnWebView", &LayoutTestController::callShouldCloseOnWebView); 197 198 bindMethod("clearAllApplicationCaches", &LayoutTestController::clearAllApplicationCaches); … … 839 840 { 840 841 // FIXME: Implement to support getting origins that have application caches. 842 result->setNull(); 843 } 844 845 void LayoutTestController::applicationCacheDiskUsageForOrigin(const CppArgumentList&, CppVariant* result) 846 { 847 // FIXME: Implement to support getting disk usage by all application cache for an origin. 841 848 result->setNull(); 842 849 } -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h
r86201 r86204 298 298 // Sets the application cache quota for the localhost origin. 299 299 void setApplicationCacheOriginQuota(const CppArgumentList&, CppVariant*); 300 // Returns disk usage by all application caches for an origin. 301 void applicationCacheDiskUsageForOrigin(const CppArgumentList&, CppVariant*); 300 302 301 303 // Clears all databases. -
trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r85925 r86204 667 667 } 668 668 669 long long LayoutTestController::applicationCacheDiskUsageForOrigin(JSStringRef name) 670 { 671 // FIXME: implement 672 return 0; 673 } 674 669 675 void LayoutTestController::clearAllDatabases() 670 676 { -
trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r85925 r86204 136 136 } 137 137 138 long long LayoutTestController::applicationCacheDiskUsageForOrigin(JSStringRef url) 139 { 140 RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url)); 141 WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]]; 142 return [WebApplicationCache diskUsageForOrigin:origin]; 143 } 144 138 145 void LayoutTestController::syncLocalStorage() 139 146 { -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r86049 r86204 572 572 } 573 573 574 long long LayoutTestController::applicationCacheDiskUsageForOrigin(const QString& origin) 575 { 576 // FIXME: Implement to support getting disk usage by all application caches for an origin. 577 return 0; 578 } 579 574 580 QStringList LayoutTestController::originsWithApplicationCache() 575 581 { -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
r85925 r86204 194 194 void setApplicationCacheOriginQuota(unsigned long long quota); 195 195 QStringList originsWithApplicationCache(); 196 long long applicationCacheDiskUsageForOrigin(const QString&); 196 197 197 198 void setDatabaseQuota(int size); -
trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r85925 r86204 996 996 } 997 997 998 long long LayoutTestController::applicationCacheDiskUsageForOrigin(JSStringRef name) 999 { 1000 // FIXME: Implement to get disk usage by all application caches for an origin. 1001 return 0; 1002 } 1003 998 1004 void LayoutTestController::clearAllDatabases() 999 1005 {
Note: See TracChangeset
for help on using the changeset viewer.