Changeset 96405 in webkit


Ignore:
Timestamp:
Sep 30, 2011 10:26:14 AM (13 years ago)
Author:
qi.2.zhang@nokia.com
Message:

WebKitTestRunner needs layoutTestController.setAppCacheMaximumSize
https://bugs.webkit.org/show_bug.cgi?id=42698

Reviewed by Andreas Kling.

Source/WebKit2:

Implemented layoutTestController.setAppCacheMaximumSize and layoutTestController.clearApplicationCache,
and call clearApplicationCache when layoutTest start up.

  • WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:

(WebKit::WebApplicationCacheManager::setAppCacheMaximumSize):

  • WebProcess/ApplicationCache/WebApplicationCacheManager.h:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleClearApplicationCache):
(WKBundleSetAppCacheMaximumSize):

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

(WebKit::InjectedBundle::clearApplicationCache):
(WebKit::InjectedBundle::setAppCacheMaximumSize):

  • WebProcess/InjectedBundle/InjectedBundle.h:

Tools:

Implemented layoutTestController.setAppCacheMaximumSize and layoutTestController.clearApplicationCache,
and call clearApplicationCache when layoutTest start up.

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

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:

(WTR::LayoutTestController::clearAllApplicationCaches):
(WTR::LayoutTestController::setAppCacheMaximumSize):

  • WebKitTestRunner/InjectedBundle/LayoutTestController.h:

LayoutTests:

Removed http/tests/appcache/max-size.html from skipped list, and also the "failed" expected file for http/tests/appcache/interrupted-update-expected.html

  • platform/mac-wk2/http/tests/appcache: Removed.
  • platform/mac-wk2/http/tests/appcache/interrupted-update-expected.txt: Removed.
  • platform/wk2/Skipped:
Location:
trunk
Files:
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96404 r96405  
     12011-09-30  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        WebKitTestRunner needs layoutTestController.setAppCacheMaximumSize
     4        https://bugs.webkit.org/show_bug.cgi?id=42698
     5
     6        Reviewed by Andreas Kling.
     7
     8        Removed http/tests/appcache/max-size.html from skipped list, and also the "failed" expected file for http/tests/appcache/interrupted-update-expected.html
     9
     10        * platform/mac-wk2/http/tests/appcache: Removed.
     11        * platform/mac-wk2/http/tests/appcache/interrupted-update-expected.txt: Removed.
     12        * platform/wk2/Skipped:
     13
    1142011-09-30  Ned Holbrook  <nholbrook@apple.com>
    215
  • trunk/LayoutTests/platform/wk2/Skipped

    r96221 r96405  
    710710security/set-form-autocomplete-attribute.html
    711711
    712 # WebKitTestRunner needs layoutTestController.setAppCacheMaximumSize
    713 # <https://bugs.webkit.org/show_bug.cgi?id=42698>
    714 http/tests/appcache/max-size.html
    715 
    716712# WebKitTestRunner needs layoutTestController.setWillSendRequestClearHeader
    717713# <https://bugs.webkit.org/show_bug.cgi?id=42699>
  • trunk/Source/WebKit2/ChangeLog

    r96400 r96405  
     12011-09-30  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        WebKitTestRunner needs layoutTestController.setAppCacheMaximumSize
     4        https://bugs.webkit.org/show_bug.cgi?id=42698
     5
     6        Reviewed by Andreas Kling.
     7
     8        Implemented layoutTestController.setAppCacheMaximumSize and layoutTestController.clearApplicationCache,
     9        and call clearApplicationCache when layoutTest start up.
     10
     11        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
     12        (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize):
     13        * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
     14        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     15        (WKBundleClearApplicationCache):
     16        (WKBundleSetAppCacheMaximumSize):
     17        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     18        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     19        (WebKit::InjectedBundle::clearApplicationCache):
     20        (WebKit::InjectedBundle::setAppCacheMaximumSize):
     21        * WebProcess/InjectedBundle/InjectedBundle.h:
     22
    1232011-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
    224
  • trunk/Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp

    r95919 r96405  
    100100}
    101101
     102void WebApplicationCacheManager::setAppCacheMaximumSize(uint64_t size)
     103{
     104    WebProcess::LocalTerminationDisabler terminationDisabler(WebProcess::shared());
     105
     106    cacheStorage().setMaximumSize(size);
     107}
     108
    102109} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.h

    r95901 r96405  
    4848    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
    4949
     50    void deleteAllEntries();
     51    void setAppCacheMaximumSize(uint64_t);
    5052private:
    5153    WebApplicationCacheManager();
     
    5355    void getApplicationCacheOrigins(uint64_t callbackID);
    5456    void deleteEntriesForOrigin(const SecurityOriginData&);
    55     void deleteAllEntries();
    5657
    5758    void didReceiveWebApplicationCacheManagerMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r95901 r96405  
    192192}
    193193
     194void WKBundleClearApplicationCache(WKBundleRef bundleRef)
     195{
     196    toImpl(bundleRef)->clearApplicationCache();
     197}
     198
     199void WKBundleSetAppCacheMaximumSize(WKBundleRef bundleRef, uint64_t size)
     200{
     201    toImpl(bundleRef)->setAppCacheMaximumSize(size);
     202}
     203
    194204int WKBundleNumberOfPages(WKBundleRef bundleRef, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels)
    195205{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r95901 r96405  
    7474WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle);
    7575WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
     76WK_EXPORT void WKBundleClearApplicationCache(WKBundleRef bundle);
     77WK_EXPORT void WKBundleSetAppCacheMaximumSize(WKBundleRef bundle, uint64_t size);
    7678WK_EXPORT int WKBundleNumberOfPages(WKBundleRef bundle, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels);
    7779WK_EXPORT int WKBundlePageNumberForElementById(WKBundleRef bundle, WKBundleFrameRef frameRef, WKStringRef idRef, double pageWidthInPixels, double pageHeightInPixels);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r95901 r96405  
    3434#include "WKAPICast.h"
    3535#include "WKBundleAPICast.h"
     36#include "WebApplicationCacheManager.h"
    3637#include "WebContextMessageKinds.h"
    3738#include "WebCoreArgumentCoders.h"
     
    194195}
    195196
     197void InjectedBundle::clearApplicationCache()
     198{
     199    WebApplicationCacheManager::shared().deleteAllEntries();
     200}
     201
     202void InjectedBundle::setAppCacheMaximumSize(uint64_t size)
     203{
     204    WebApplicationCacheManager::shared().setAppCacheMaximumSize(size);
     205}
     206
    196207int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
    197208{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r95901 r96405  
    124124    void setDatabaseQuota(uint64_t);
    125125
     126    // Application Cache API
     127    void clearApplicationCache();
     128    void setAppCacheMaximumSize(uint64_t);
     129
    126130    // Garbage collection API
    127131    void garbageCollectJavaScriptObjects();
  • trunk/Tools/ChangeLog

    r96402 r96405  
     12011-09-30  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        WebKitTestRunner needs layoutTestController.setAppCacheMaximumSize
     4        https://bugs.webkit.org/show_bug.cgi?id=42698
     5
     6        Reviewed by Andreas Kling.
     7
     8        Implemented layoutTestController.setAppCacheMaximumSize and layoutTestController.clearApplicationCache,
     9        and call clearApplicationCache when layoutTest start up.
     10
     11        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     12        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     13        (WTR::InjectedBundle::beginTesting):
     14        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     15        (WTR::LayoutTestController::clearAllApplicationCaches):
     16        (WTR::LayoutTestController::setAppCacheMaximumSize):
     17        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     18
    1192011-09-30  Zeno Albisser  <zeno.albisser@nokia.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r95109 r96405  
    9797        DOMString pathToLocalResource(in DOMString url);
    9898
     99        // Application Cache API
     100        void clearAllApplicationCaches();
     101        void setAppCacheMaximumSize(in unsigned long long size);
     102
    99103        // Compositing testing.
    100104        DOMString layerTreeAsText();
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r96005 r96405  
    191191
    192192    WKBundleClearAllDatabases(m_bundle);
     193    WKBundleClearApplicationCache(m_bundle);
    193194    WKBundleResetOriginAccessWhitelists(m_bundle);
    194195}
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r96005 r96405  
    328328}
    329329
     330void LayoutTestController::clearAllApplicationCaches()
     331{
     332    WKBundleClearApplicationCache(InjectedBundle::shared().bundle());
     333}
     334
     335void LayoutTestController::setAppCacheMaximumSize(uint64_t size)
     336{
     337    WKBundleSetAppCacheMaximumSize(InjectedBundle::shared().bundle(), size);
     338}
     339
    330340bool LayoutTestController::isCommandEnabled(JSStringRef name)
    331341{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r95109 r96405  
    126126    JSRetainPtr<JSStringRef> pathToLocalResource(JSStringRef);
    127127
     128    // Application Cache
     129    void clearAllApplicationCaches();
     130    void setAppCacheMaximumSize(uint64_t);
     131
    128132    // Printing
    129133    int numberOfPages(double pageWidthInPixels, double pageHeightInPixels);
Note: See TracChangeset for help on using the changeset viewer.