Changeset 128173 in webkit


Ignore:
Timestamp:
Sep 11, 2012 5:32:24 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
https://bugs.webkit.org/show_bug.cgi?id=96372

Patch by Christophe Dumez <Christophe Dumez> on 2012-09-11
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Add Bundle C API to clear the application cache for a
given origin. This is needed by WebKitTestRunner to
implement clearApplicationCacheForOrigin().

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleClearApplicationCacheForOrigin):

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::clearApplicationCacheForOrigin):
(WebKit):

  • WebProcess/InjectedBundle/InjectedBundle.h:

(InjectedBundle):

Tools:

Implement clearApplicationCacheForOrigin() in WebKitTestRunner.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::clearApplicationCacheForOrigin):
(WTR):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(TestRunner):

LayoutTests:

Refresh Skipped list now that clearApplicationCacheForOrigin
is implemented in TestRunner. Some tests were also marked as
failing due to clearAllApplicationCaches() being missing
despite the fact that it is already implemented.

  • platform/wk2/Skipped:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r128169 r128173  
     12012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=96372
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Refresh Skipped list now that clearApplicationCacheForOrigin
     9        is implemented in TestRunner. Some tests were also marked as
     10        failing due to clearAllApplicationCaches() being missing
     11        despite the fact that it is already implemented.
     12
     13        * platform/wk2/Skipped:
     14
    1152012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
    216
  • trunk/LayoutTests/platform/wk2/Skipped

    r128169 r128173  
    204204
    205205# WTR needs an implementation of dumpApplicationCacheDelegateCallbacks
     206http/tests/appcache/origin-delete.html
     207http/tests/appcache/origin-quota.html
     208http/tests/appcache/origin-quota-continued-download.html
     209http/tests/appcache/origin-quota-continued-download-multiple-manifests.html
    206210http/tests/appcache/origin-usage.html
     211http/tests/appcache/origins-with-appcache.html
    207212
    208213# WebKitTestRunner needs to support layoutTestController.dumpDOMAsWebArchive
     
    676681fast/workers/worker-close-more.html
    677682
    678 # WebKitTestRunner needs layoutTestController.clearAllApplicationCaches
    679 http/tests/appcache/origin-delete.html
    680 http/tests/appcache/origin-quota.html
    681 http/tests/appcache/origin-quota-continued-download.html
    682 http/tests/appcache/origin-quota-continued-download-multiple-manifests.html
    683 http/tests/appcache/origins-with-appcache.html
    684 
    685683# WebKitTestRunner needs layoutTestController.callShouldCloseOnWebView
    686684fast/events/onbeforeunload-focused-iframe.html
  • trunk/Source/WebKit2/ChangeLog

    r128169 r128173  
     12012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=96372
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add Bundle C API to clear the application cache for a
     9        given origin. This is needed by WebKitTestRunner to
     10        implement clearApplicationCacheForOrigin().
     11
     12        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     13        (WKBundleClearApplicationCacheForOrigin):
     14        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     15        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     16        (WebKit::InjectedBundle::clearApplicationCacheForOrigin):
     17        (WebKit):
     18        * WebProcess/InjectedBundle/InjectedBundle.h:
     19        (InjectedBundle):
     20
    1212012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
    222
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r128169 r128173  
    227227}
    228228
     229void WKBundleClearApplicationCacheForOrigin(WKBundleRef bundleRef, WKStringRef origin)
     230{
     231    toImpl(bundleRef)->clearApplicationCacheForOrigin(toImpl(origin)->string());
     232}
     233
    229234void WKBundleSetAppCacheMaximumSize(WKBundleRef bundleRef, uint64_t size)
    230235{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r128169 r128173  
    9595// Application Cache API
    9696WK_EXPORT void WKBundleClearApplicationCache(WKBundleRef bundle);
     97WK_EXPORT void WKBundleClearApplicationCacheForOrigin(WKBundleRef bundle, WKStringRef origin);
    9798WK_EXPORT void WKBundleSetAppCacheMaximumSize(WKBundleRef bundle, uint64_t size);
    9899WK_EXPORT uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundle, WKStringRef origin);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r128169 r128173  
    328328}
    329329
     330void InjectedBundle::clearApplicationCacheForOrigin(const String& originString)
     331{
     332    RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
     333    ApplicationCache::deleteCacheForOrigin(origin.get());
     334}
     335
    330336void InjectedBundle::setAppCacheMaximumSize(uint64_t size)
    331337{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r128169 r128173  
    146146    // Application Cache API
    147147    void clearApplicationCache();
     148    void clearApplicationCacheForOrigin(const String& origin);
    148149    void setAppCacheMaximumSize(uint64_t);
    149150    uint64_t appCacheUsageForOrigin(const String& origin);
  • trunk/Tools/ChangeLog

    r128170 r128173  
     12012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=96372
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Implement clearApplicationCacheForOrigin() in WebKitTestRunner.
     9
     10        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     11        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     12        (WTR::TestRunner::clearApplicationCacheForOrigin):
     13        (WTR):
     14        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     15        (TestRunner):
     16
    1172012-09-11  Peter Beverloo  <peter@chromium.org>
    218
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r128169 r128173  
    110110        void setAppCacheMaximumSize(in unsigned long long size);
    111111        long long applicationCacheDiskUsageForOrigin(in DOMString origin);
     112        void clearApplicationCacheForOrigin(in DOMString name);
    112113
    113114        // Compositing testing.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r128169 r128173  
    303303}
    304304
     305void TestRunner::clearApplicationCacheForOrigin(JSStringRef origin)
     306{
     307    WKBundleClearApplicationCacheForOrigin(InjectedBundle::shared().bundle(), toWK(origin).get());
     308}
     309
    305310void TestRunner::setAppCacheMaximumSize(uint64_t size)
    306311{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r128169 r128173  
    145145    // Application Cache
    146146    void clearAllApplicationCaches();
     147    void clearApplicationCacheForOrigin(JSStringRef origin);
    147148    void setAppCacheMaximumSize(uint64_t);
    148149    long long applicationCacheDiskUsageForOrigin(JSStringRef origin);
Note: See TracChangeset for help on using the changeset viewer.