Changeset 64613 in webkit


Ignore:
Timestamp:
Aug 3, 2010 6:50:29 PM (14 years ago)
Author:
Joseph Pecoraro
Message:

2010-08-03 Joseph Pecoraro <Joseph Pecoraro>

Reviewed by David Kilzer.

LayoutTests:

2010-08-03 Joseph Pecoraro <Joseph Pecoraro>

Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
https://bugs.webkit.org/show_bug.cgi?id=40627

Part 6 - LayoutTest and Cleanup

  • http/tests/appcache/origin-quota-expected.txt: Added.
  • http/tests/appcache/origin-quota.html: Added.
  • http/tests/appcache/resources/quota-origin-iframe-1.html: Added.
  • http/tests/appcache/resources/quota-origin-iframe-1.manifest: Added.
  • http/tests/appcache/resources/quota-origin-iframe-2.html: Added.
  • http/tests/appcache/resources/quota-origin-iframe-2.manifest: Added.
  • http/tests/appcache/resources/quota-origin-iframe-3.html: Added.
  • http/tests/appcache/resources/quota-origin-iframe-3.manifest: Added.

WebCore:

2010-08-03 Joseph Pecoraro <Joseph Pecoraro>

Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
https://bugs.webkit.org/show_bug.cgi?id=40627

Part 6 - LayoutTest and Cleanup

Test: http/tests/appcache/origin-quota.html

  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::scheduleReachedOriginQuotaCallback): made synchronous, as asynchronously the cache group was deleted too soon.
  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin): all storing operations should force the database to be created if needed.

WebKit/mac:

2010-08-03 Joseph Pecoraro <Joseph Pecoraro>

Part 6 - LayoutTest and Cleanup

  • WebCoreSupport/WebApplicationCache.h:
  • WebCoreSupport/WebApplicationCache.mm: (+[WebApplicationCache setMaximumSize:]): refactor out deleting the application caches. (+[WebApplicationCache deleteAllApplicationCaches]): delete application caches.

Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
https://bugs.webkit.org/show_bug.cgi?id=40627

WebKitTools:

2010-08-03 Joseph Pecoraro <Joseph Pecoraro>

Part 6 - LayoutTest and Cleanup

Allow tests to delete application caches and set application cache
origin quotas, so they can be tested.

  • DumpRenderTree/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (dumpApplicationCacheDelegateCallbacksCallback): JavaScript callback, delegates to the controller. (clearAllApplicationCachesCallback): should delete all application caches. (setApplicationCacheOriginQuotaCallback): should set the origin quota for the localhost tests. (LayoutTestController::staticFunctions):
  • DumpRenderTree/LayoutTestController.h: (LayoutTestController::dumpApplicationCacheDelegateCallbacks): accessor to see if application cache callbacks should be output. (LayoutTestController::setDumpApplicationCacheDelegateCallbacks): enable or disable debug output when the application cache quota is reached.

Mac implementation.

  • DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::clearAllApplicationCaches): delete application caches. (LayoutTestController::setApplicationCacheOriginQuota): set the quota for localhost.
  • DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]): style fix. (-[UIDelegate webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:]): reset the quota.

Stub implementations for other platforms.

  • DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::clearAllApplicationCaches): (LayoutTestController::setApplicationCacheOriginQuota):
  • DumpRenderTree/chromium/LayoutTestController.h:
  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::clearAllApplicationCaches): (LayoutTestController::setApplicationCacheOriginQuota):
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::clearAllApplicationCaches): (LayoutTestController::setApplicationCacheOriginQuota):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
  • DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::clearAllApplicationCaches): (LayoutTestController::setApplicationCacheOriginQuota):
  • DumpRenderTree/wx/LayoutTestControllerWx.cpp: (LayoutTestController::clearAllApplicationCaches): (LayoutTestController::setApplicationCacheOriginQuota):

Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
https://bugs.webkit.org/show_bug.cgi?id=40627

Location:
trunk
Files:
8 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r64611 r64613  
     12010-08-03  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        Reviewed by David Kilzer.
     4
     5        Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
     6        https://bugs.webkit.org/show_bug.cgi?id=40627
     7
     8        Part 6 - LayoutTest and Cleanup
     9
     10        * http/tests/appcache/origin-quota-expected.txt: Added.
     11        * http/tests/appcache/origin-quota.html: Added.
     12        * http/tests/appcache/resources/quota-origin-iframe-1.html: Added.
     13        * http/tests/appcache/resources/quota-origin-iframe-1.manifest: Added.
     14        * http/tests/appcache/resources/quota-origin-iframe-2.html: Added.
     15        * http/tests/appcache/resources/quota-origin-iframe-2.manifest: Added.
     16        * http/tests/appcache/resources/quota-origin-iframe-3.html: Added.
     17        * http/tests/appcache/resources/quota-origin-iframe-3.manifest: Added.
     18
    1192010-08-03  Eric Seidel  <eric@webkit.org>
    220
  • trunk/WebCore/ChangeLog

    r64610 r64613  
     12010-08-03  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        Reviewed by David Kilzer.
     4
     5        Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
     6        https://bugs.webkit.org/show_bug.cgi?id=40627
     7
     8        Part 6 - LayoutTest and Cleanup
     9
     10        Test: http/tests/appcache/origin-quota.html
     11
     12        * loader/appcache/ApplicationCacheGroup.cpp:
     13        (WebCore::ApplicationCacheGroup::scheduleReachedOriginQuotaCallback): made synchronous, as asynchronously the cache group was deleted too soon.
     14        * loader/appcache/ApplicationCacheStorage.cpp:
     15        (WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin): all storing operations should force the database to be created if needed.
     16
    1172010-08-03  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/WebCore/loader/appcache/ApplicationCacheGroup.cpp

    r64400 r64613  
    10801080};
    10811081
    1082 class OriginQuotaReachedCallbackTimer: public TimerBase {
    1083 public:
    1084     OriginQuotaReachedCallbackTimer(ApplicationCacheGroup* cacheGroup, Frame* frame)
    1085         : m_cacheGroup(cacheGroup)
    1086         , m_frame(frame)
    1087     {
    1088     }
    1089 
    1090 private:
    1091     virtual void fired()
    1092     {
    1093         m_cacheGroup->didReachOriginQuota(m_frame.release());
    1094         delete this;
    1095     }
    1096 
    1097     ApplicationCacheGroup* m_cacheGroup;
    1098     RefPtr<Frame> m_frame;
    1099 };
    1100 
    11011082void ApplicationCacheGroup::scheduleReachedMaxAppCacheSizeCallback()
    11021083{
     
    11091090void ApplicationCacheGroup::scheduleReachedOriginQuotaCallback()
    11101091{
    1111     ASSERT(isMainThread());
    1112     RefPtr<Frame> frameProtector = m_frame;
    1113     OriginQuotaReachedCallbackTimer* timer = new OriginQuotaReachedCallbackTimer(this, frameProtector.get());
    1114     timer->startOneShot(0);
    1115     // The timer will delete itself once it fires.
     1092    // FIXME: it might be nice to run this asynchronously, because there is no return value to wait for.
     1093    didReachOriginQuota(m_frame);
    11161094}
    11171095
  • trunk/WebCore/loader/appcache/ApplicationCacheStorage.cpp

    r64400 r64613  
    519519bool ApplicationCacheStorage::storeUpdatedQuotaForOrigin(const SecurityOrigin* origin, int64_t quota)
    520520{
    521     openDatabase(false);
     521    openDatabase(true);
    522522    if (!m_database.isOpen())
    523523        return false;
  • trunk/WebKit/mac/ChangeLog

    r64612 r64613  
     12010-08-03  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        Reviewed by David Kilzer.
     4
     5        Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
     6        https://bugs.webkit.org/show_bug.cgi?id=40627
     7
     8        Part 6 - LayoutTest and Cleanup
     9
     10        * WebCoreSupport/WebApplicationCache.h:
     11        * WebCoreSupport/WebApplicationCache.mm:
     12        (+[WebApplicationCache setMaximumSize:]): refactor out deleting the application caches.
     13        (+[WebApplicationCache deleteAllApplicationCaches]): delete application caches.
     14
    1152010-08-03  Joseph Pecoraro  <joepeck@webkit.org>
    216
  • trunk/WebKit/mac/WebCoreSupport/WebApplicationCache.h

    r64400 r64613  
    3434+ (void)setDefaultOriginQuota:(long long)size;
    3535
     36+ (void)deleteAllApplicationCaches;
     37
    3638@end
  • trunk/WebKit/mac/WebCoreSupport/WebApplicationCache.mm

    r64397 r64613  
    4040+ (void)setMaximumSize:(long long)size
    4141{
    42     cacheStorage().empty();
    43     cacheStorage().vacuumDatabaseFile();
     42    [WebApplicationCache deleteAllApplicationCaches];
    4443    cacheStorage().setMaximumSize(size);
    4544}
     
    5554}
    5655
     56+ (void)deleteAllApplicationCaches
     57{
     58    cacheStorage().empty();
     59    cacheStorage().vacuumDatabaseFile();
     60}
     61
    5762@end
    5863
  • trunk/WebKitTools/ChangeLog

    r64612 r64613  
     12010-08-03  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        Reviewed by David Kilzer.
     4
     5        Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
     6        https://bugs.webkit.org/show_bug.cgi?id=40627
     7
     8        Part 6 - LayoutTest and Cleanup
     9
     10          Allow tests to delete application caches and set application cache
     11          origin quotas, so they can be tested.
     12
     13        * DumpRenderTree/LayoutTestController.cpp:
     14        (LayoutTestController::LayoutTestController):
     15        (dumpApplicationCacheDelegateCallbacksCallback): JavaScript callback, delegates to the controller.
     16        (clearAllApplicationCachesCallback): should delete all application caches.
     17        (setApplicationCacheOriginQuotaCallback): should set the origin quota for the localhost tests.
     18        (LayoutTestController::staticFunctions):
     19        * DumpRenderTree/LayoutTestController.h:
     20        (LayoutTestController::dumpApplicationCacheDelegateCallbacks): accessor to see if application cache callbacks should be output.
     21        (LayoutTestController::setDumpApplicationCacheDelegateCallbacks): enable or disable debug output when the application cache quota is reached.
     22
     23          Mac implementation.
     24
     25        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
     26        (LayoutTestController::clearAllApplicationCaches): delete application caches.
     27        (LayoutTestController::setApplicationCacheOriginQuota): set the quota for localhost.
     28        * DumpRenderTree/mac/UIDelegate.mm:
     29        (-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]): style fix.
     30        (-[UIDelegate webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:]): reset the quota.
     31
     32          Stub implementations for other platforms.
     33
     34        * DumpRenderTree/chromium/LayoutTestController.cpp:
     35        (LayoutTestController::LayoutTestController):
     36        (LayoutTestController::clearAllApplicationCaches):
     37        (LayoutTestController::setApplicationCacheOriginQuota):
     38        * DumpRenderTree/chromium/LayoutTestController.h:
     39        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
     40        (LayoutTestController::clearAllApplicationCaches):
     41        (LayoutTestController::setApplicationCacheOriginQuota):
     42        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     43        (LayoutTestController::clearAllApplicationCaches):
     44        (LayoutTestController::setApplicationCacheOriginQuota):
     45        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     46        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
     47        (LayoutTestController::clearAllApplicationCaches):
     48        (LayoutTestController::setApplicationCacheOriginQuota):
     49        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
     50        (LayoutTestController::clearAllApplicationCaches):
     51        (LayoutTestController::setApplicationCacheOriginQuota):
     52
    1532010-08-03  Joseph Pecoraro  <joepeck@webkit.org>
    254
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp

    r64356 r64613  
    4242
    4343LayoutTestController::LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash)
    44     : m_dumpAsPDF(false)
     44    : m_dumpApplicationCacheDelegateCallbacks(false)
     45    , m_dumpAsPDF(false)
    4546    , m_dumpAsText(false)
    4647    , m_dumpBackForwardList(false)
     
    9394// Static Functions
    9495
     96static JSValueRef dumpApplicationCacheDelegateCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     97{
     98    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     99    controller->setDumpApplicationCacheDelegateCallbacks(true);
     100    return JSValueMakeUndefined(context);
     101}
     102
    95103static JSValueRef dumpAsPDFCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    96104{
     
    309317
    310318    return JSValueMakeBoolean(context, controller->callShouldCloseOnWebView());
     319}
     320
     321static JSValueRef clearAllApplicationCachesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     322{
     323    // Has mac implementation
     324    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     325    controller->clearAllApplicationCaches();
     326
     327    return JSValueMakeUndefined(context);
    311328}
    312329
     
    843860       
    844861    return JSValueMakeUndefined(context);
    845 
     862}
     863
     864static JSValueRef setApplicationCacheOriginQuotaCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     865{
     866    // Has mac implementation
     867    if (argumentCount < 1)
     868        return JSValueMakeUndefined(context);
     869
     870    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     871
     872    double size = JSValueToNumber(context, arguments[0], NULL);
     873    if (!isnan(size))
     874        controller->setApplicationCacheOriginQuota(static_cast<unsigned long long>(size));
     875
     876    return JSValueMakeUndefined(context);
    846877}
    847878
     
    17641795        { "apiTestGoToCurrentBackForwardItem", apiTestGoToCurrentBackForwardItemCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17651796        { "callShouldCloseOnWebView", callShouldCloseOnWebViewCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1797        { "clearAllApplicationCaches", clearAllApplicationCachesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17661798        { "clearAllDatabases", clearAllDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17671799        { "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     
    17731805        { "dispatchPendingLoadRequests", dispatchPendingLoadRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17741806        { "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1807        { "dumpApplicationCacheDelegateCallbacks", dumpApplicationCacheDelegateCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17751808        { "dumpAsText", dumpAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17761809        { "dumpBackForwardList", dumpBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     
    18271860        { "setAllowFileAccessFromFileURLs", setAllowFileAccessFromFileURLsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    18281861        { "setAlwaysAcceptCookies", setAlwaysAcceptCookiesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    1829         { "setAppCacheMaximumSize", setAppCacheMaximumSizeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1862        { "setAppCacheMaximumSize", setAppCacheMaximumSizeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1863        { "setApplicationCacheOriginQuota", setApplicationCacheOriginQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    18301864        { "setAuthenticationPassword", setAuthenticationPasswordCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    18311865        { "setAuthenticationUsername", setAuthenticationUsernameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.h

    r64356 r64613  
    4646
    4747    void addDisallowedURL(JSStringRef url);
     48    void clearAllApplicationCaches();
    4849    void clearAllDatabases();
    4950    void clearBackForwardList();
     
    8081    void setAllowFileAccessFromFileURLs(bool);
    8182    void setAppCacheMaximumSize(unsigned long long quota);
     83    void setApplicationCacheOriginQuota(unsigned long long quota);
    8284    void setAuthorAndUserStylesEnabled(bool);
    8385    void setCacheModel(int);
     
    127129    void setGeneratePixelResults(bool generatePixelResults) { m_generatePixelResults = generatePixelResults; }
    128130
     131    bool dumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; }
     132    void setDumpApplicationCacheDelegateCallbacks(bool dumpCallbacks) { m_dumpApplicationCacheDelegateCallbacks = dumpCallbacks; }
     133
    129134    bool dumpBackForwardList() const { return m_dumpBackForwardList; }
    130135    void setDumpBackForwardList(bool dumpBackForwardList) { m_dumpBackForwardList = dumpBackForwardList; }
     
    288293    LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash);
    289294
     295    bool m_dumpApplicationCacheDelegateCallbacks;
    290296    bool m_dumpAsPDF;
    291297    bool m_dumpAsText;
  • trunk/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp

    r64451 r64613  
    155155    bindMethod("setPrivateBrowsingEnabled", &LayoutTestController::setPrivateBrowsingEnabled);
    156156    bindMethod("setUseDashboardCompatibilityMode", &LayoutTestController::setUseDashboardCompatibilityMode);
     157    bindMethod("clearAllApplicationCaches", &LayoutTestController::clearAllApplicationCaches);
     158    bindMethod("setApplicationCacheOriginQuota", &LayoutTestController::setApplicationCacheOriginQuota);
    157159
    158160    bindMethod("setJavaScriptCanAccessClipboard", &LayoutTestController::setJavaScriptCanAccessClipboard);
     
    646648{
    647649    // We have no need to support Dashboard Compatibility Mode (mac-only)
     650    result->setNull();
     651}
     652
     653void LayoutTestController::clearAllApplicationCaches(const CppArgumentList&, CppVariant* result)
     654{
     655    // FIXME: implement to support Application Cache Quotas.
     656    result->setNull();
     657}
     658
     659void LayoutTestController::setApplicationCacheOriginQuota(const CppArgumentList&, CppVariant* result)
     660{
     661    // FIXME: implement to support Application Cache Quotas.
    648662    result->setNull();
    649663}
  • trunk/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h

    r64356 r64613  
    251251    void removeOriginAccessWhitelistEntry(const CppArgumentList&, CppVariant*);
    252252
     253    // Clears all Application Caches.
     254    void clearAllApplicationCaches(const CppArgumentList&, CppVariant*);
     255    // Sets the Application Quota for the localhost origin.
     256    void setApplicationCacheOriginQuota(const CppArgumentList&, CppVariant*);
     257
    253258    // Clears all databases.
    254259    void clearAllDatabases(const CppArgumentList&, CppVariant*);
  • trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r64524 r64613  
    543543}
    544544
     545void LayoutTestController::clearAllApplicationCaches()
     546{
     547    // FIXME: implement to support Application Cache quotas.
     548}
     549
     550void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
     551{
     552    // FIXME: implement to support Application Cache quotas.
     553}
     554
    545555void LayoutTestController::clearAllDatabases()
    546556{
  • trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm

    r64612 r64613  
    125125}
    126126
     127void LayoutTestController::clearAllApplicationCaches()
     128{
     129    [WebApplicationCache deleteAllApplicationCaches];
     130}
     131
    127132void LayoutTestController::clearAllDatabases()
    128133{
     
    293298{
    294299    [WebApplicationCache setMaximumSize:size];
     300}
     301
     302void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
     303{
     304    WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:@"http://127.0.0.1:8000"]];
     305    [[origin applicationCacheQuotaManager] setQuota:quota];
     306    [origin release];
    295307}
    296308
  • trunk/WebKitTools/DumpRenderTree/mac/UIDelegate.mm

    r64612 r64613  
    3434#import "EventSendingController.h"
    3535#import "LayoutTestController.h"
     36#import <WebKit/WebApplicationCache.h>
    3637#import <WebKit/WebFramePrivate.h>
    3738#import <WebKit/WebHTMLViewPrivate.h>
     
    157158- (void)webView:(WebView *)sender frame:(WebFrame *)frame exceededDatabaseQuotaForSecurityOrigin:(WebSecurityOrigin *)origin database:(NSString *)databaseIdentifier
    158159{
    159     if (!done && gLayoutTestController->dumpDatabaseCallbacks())
     160    if (!done && gLayoutTestController->dumpDatabaseCallbacks()) {
    160161        printf("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%s\n", [[origin protocol] UTF8String], [[origin host] UTF8String],
    161162            [origin port], [databaseIdentifier UTF8String]);
     163    }
    162164
    163165    static const unsigned long long defaultQuota = 5 * 1024 * 1024;   
    164166    [[origin databaseQuotaManager] setQuota:defaultQuota];
     167}
     168
     169- (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin
     170{
     171    if (!done && gLayoutTestController->dumpApplicationCacheDelegateCallbacks()) {
     172        printf("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{%s, %s, %i}\n",
     173            [[origin protocol] UTF8String], [[origin host] UTF8String], [origin port]);
     174    }
     175
     176    static const unsigned long long defaultOriginQuota = [WebApplicationCache defaultOriginQuota];
     177    [[origin applicationCacheQuotaManager] setQuota:defaultOriginQuota];
    165178}
    166179
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r64356 r64613  
    495495}
    496496
     497void LayoutTestController::clearAllApplicationCaches()
     498{
     499    // FIXME: implement to support Application Cache quotas.
     500}
     501
     502void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
     503{
     504    // FIXME: implement to support Application Cache quotas.
     505}
     506
    497507void LayoutTestController::setDatabaseQuota(int size)
    498508{
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r64356 r64613  
    175175    void disableImageLoading();
    176176
     177    void clearAllApplicationCaches();
     178    void setApplicationCacheOriginQuota(unsigned long long quota);
     179
    177180    void setDatabaseQuota(int size);
    178181    void clearAllDatabases();
  • trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp

    r64356 r64613  
    889889}
    890890
     891void LayoutTestController::clearAllApplicationCaches()
     892{
     893    // FIXME: implement to support Application Cache quotas.
     894}
     895
     896void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
     897{
     898    // FIXME: implement to support Application Cache quotas.
     899}
     900
    891901void LayoutTestController::clearAllDatabases()
    892902{
  • trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp

    r64356 r64613  
    229229}
    230230
     231void LayoutTestController::clearAllApplicationCaches()
     232{
     233    // FIXME: implement to support Application Cache quotas.
     234}
     235
     236void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
     237{
     238    // FIXME: implement to support Application Cache quotas.
     239}
     240
    231241void LayoutTestController::clearAllDatabases()
    232242{
Note: See TracChangeset for help on using the changeset viewer.