Changeset 128157 in webkit


Ignore:
Timestamp:
Sep 11, 2012 2:16:21 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

WTR needs an implementation of applicationCacheDiskUsageForOrigin
https://bugs.webkit.org/show_bug.cgi?id=87188

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

Source/WebKit2:

Add Bundle private C API to retrieve the application cache
usage for a specific security origin. This is needed by
WebKitTestRunner.

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

(WKBundleGetAppCacheUsageForOrigin):

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

(WebKit::InjectedBundle::appCacheUsageForOrigin):
(WebKit):

  • WebProcess/InjectedBundle/InjectedBundle.h:

(InjectedBundle):

Tools:

Add implementation for applicationCacheDiskUsageForOrigin()
in WebKitTestRunner.

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

(WTR::TestRunner::applicationCacheDiskUsageForOrigin):
(WTR):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(TestRunner):

LayoutTests:

Unskip test cases that require an implementation of
applicationCacheDiskUsageForOrigin in WebKitTestRunner.

  • platform/efl/Skipped:
  • platform/wk2/Skipped:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r128155 r128157  
     12012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        WTR needs an implementation of applicationCacheDiskUsageForOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=87188
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Unskip test cases that require an implementation of
     9        applicationCacheDiskUsageForOrigin in WebKitTestRunner.
     10
     11        * platform/efl/Skipped:
     12        * platform/wk2/Skipped:
     13
    1142012-09-11  Mihnea Ovidenie  <mihnea@adobe.com>
    215
  • trunk/LayoutTests/platform/efl/Skipped

    r127389 r128157  
    329329fast/text/midword-break-after-breakable-char.html
    330330http/tests/navigation/go-back-to-error-page.html
    331 loader/go-back-to-different-window-size.html
    332331userscripts/user-script-plugin-document.html
    333332
     
    742741http/tests/navigation/no-referrer-reset.html
    743742http/tests/navigation/no-referrer-target-blank.html
    744 http/tests/navigation/ping-cross-origin-from-https.html
    745743http/tests/navigation/post-goback-same-url.html
    746744http/tests/navigation/post-goback2.html
  • trunk/LayoutTests/platform/wk2/Skipped

    r127966 r128157  
    203203fast/text/zero-font-size.html
    204204
    205 # WTR needs an implementation of applicationCacheDiskUsageForOrigin
    206 # https://bugs.webkit.org/show_bug.cgi?id=87188
     205# WTR needs an implementation of dumpApplicationCacheDelegateCallbacks
    207206http/tests/appcache/origin-usage.html
    208 http/tests/canvas/webgl/origin-clean-conformance.html
    209 http/tests/navigation/ping-cross-origin-from-https.html
    210 http/tests/security/webgl-remote-read-remote-image-allowed.html
    211 http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html
    212 http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html
    213 loader/go-back-to-different-window-size.html
    214 media/restore-from-page-cache.html
    215 java/embedding-java-with-object.html
    216207
    217208# WebKitTestRunner needs to support layoutTestController.dumpDOMAsWebArchive
  • trunk/Source/WebKit2/ChangeLog

    r128154 r128157  
     12012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        WTR needs an implementation of applicationCacheDiskUsageForOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=87188
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add Bundle private C API to retrieve the application cache
     9        usage for a specific security origin. This is needed by
     10        WebKitTestRunner.
     11
     12        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     13        (WKBundleGetAppCacheUsageForOrigin):
     14        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     15        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     16        (WebKit::InjectedBundle::appCacheUsageForOrigin):
     17        (WebKit):
     18        * WebProcess/InjectedBundle/InjectedBundle.h:
     19        (InjectedBundle):
     20
    1212012-09-11  Zhigang Gong  <zhigang.gong@linux.intel.com>
    222
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r127909 r128157  
    232232}
    233233
     234uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundleRef, WKStringRef origin)
     235{
     236    return toImpl(bundleRef)->appCacheUsageForOrigin(toImpl(origin)->string());
     237}
     238
    234239int WKBundleNumberOfPages(WKBundleRef bundleRef, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels)
    235240{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r127909 r128157  
    9595WK_EXPORT void WKBundleClearApplicationCache(WKBundleRef bundle);
    9696WK_EXPORT void WKBundleSetAppCacheMaximumSize(WKBundleRef bundle, uint64_t size);
     97WK_EXPORT uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundle, WKStringRef origin);
    9798
    9899// Garbage collection API
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r127966 r128157  
    4747#include <JavaScriptCore/APICast.h>
    4848#include <JavaScriptCore/JSLock.h>
     49#include <WebCore/ApplicationCache.h>
    4950#include <WebCore/Frame.h>
    5051#include <WebCore/FrameView.h>
     
    332333}
    333334
     335uint64_t InjectedBundle::appCacheUsageForOrigin(const String& originString)
     336{
     337    RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
     338    return ApplicationCache::diskUsageForOrigin(origin.get());
     339}
     340
    334341int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
    335342{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r127909 r128157  
    146146    void clearApplicationCache();
    147147    void setAppCacheMaximumSize(uint64_t);
     148    uint64_t appCacheUsageForOrigin(const String& origin);
    148149
    149150    // Garbage collection API
  • trunk/Tools/ChangeLog

    r128140 r128157  
     12012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        WTR needs an implementation of applicationCacheDiskUsageForOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=87188
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add implementation for applicationCacheDiskUsageForOrigin()
     9        in WebKitTestRunner.
     10
     11        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     12        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     13        (WTR::TestRunner::applicationCacheDiskUsageForOrigin):
     14        (WTR):
     15        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     16        (TestRunner):
     17
    1182012-09-10  Joanmarie Diggs  <jdiggs@igalia.com>
    219
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r128129 r128157  
    108108        void clearAllApplicationCaches();
    109109        void setAppCacheMaximumSize(in unsigned long long size);
     110        long long applicationCacheDiskUsageForOrigin(in DOMString origin);
    110111
    111112        // Compositing testing.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r128129 r128157  
    308308}
    309309
     310long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef origin)
     311{
     312    return WKBundleGetAppCacheUsageForOrigin(InjectedBundle::shared().bundle(), toWK(origin).get());
     313}
     314
    310315bool TestRunner::isCommandEnabled(JSStringRef name)
    311316{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r128129 r128157  
    145145    void clearAllApplicationCaches();
    146146    void setAppCacheMaximumSize(uint64_t);
     147    long long applicationCacheDiskUsageForOrigin(JSStringRef origin);
    147148
    148149    // Printing
Note: See TracChangeset for help on using the changeset viewer.