[EFL][DRT] LayoutTestController does not implement clearApplicationCacheForOrigin

https://bugs.webkit.org/show_bug.cgi?id=86195

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-05-31
Reviewed by Gustavo Noronha Silva.

Source/WebKit/efl:

add new function to clear security origin application cache,
and a function to create a security origin from url string.
Reindent the header to match new longer return signature.

* ewk/ewk_security_origin.cpp:
(ewk_security_origin_application_cache_clear):
(ewk_security_origin_new_from_string):
* ewk/ewk_security_origin.h:

Tools:

Implement clearApplicationCacheForOrigin in EFL
LayoutTestController.

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::clearApplicationCacheForOrigin):

LayoutTests:

Unskip http/tests/appcache/origin-delete.html now that
EFL TestLayoutController has required functionality.

* platform/efl/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bf4ed05e
2012-05-31 Jussi Kukkonen <jussi.kukkonen@intel.com>
[EFL][DRT] LayoutTestController does not implement clearApplicationCacheForOrigin
https://bugs.webkit.org/show_bug.cgi?id=86195
Reviewed by Gustavo Noronha Silva.
Unskip http/tests/appcache/origin-delete.html now that
EFL TestLayoutController has required functionality.
* platform/efl/Skipped:
2012-05-31 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] Unreviewed. Added FAIL expectation due to failure after r119100.
......
......@@ -172,10 +172,6 @@ fast/parser/pre-html5-parser-quirks.html
# Fallback resource wasn't used for a redirect to a resource with another origin
http/tests/appcache/fallback.html
# EFL's LayoutTestController does not implement clearApplicationCacheForOrigin
http/tests/appcache/origin-delete.html
http/tests/appcache/origin-usage.html
# EFL's LayoutTestController does not implement applicationCacheDiskUsageForOrigin
http/tests/appcache/origin-usage.html
......
2012-05-31 Jussi Kukkonen <jussi.kukkonen@intel.com>
[EFL][DRT] LayoutTestController does not implement clearApplicationCacheForOrigin
https://bugs.webkit.org/show_bug.cgi?id=86195
Reviewed by Gustavo Noronha Silva.
add new function to clear security origin application cache,
and a function to create a security origin from url string.
Reindent the header to match new longer return signature.
* ewk/ewk_security_origin.cpp:
(ewk_security_origin_application_cache_clear):
(ewk_security_origin_new_from_string):
* ewk/ewk_security_origin.h:
2012-05-30 Christophe Dumez <christophe.dumez@intel.com>
[EFL] EFL's DRT should print the number of MessagePorts for new each new intent
......
......@@ -20,6 +20,7 @@
#include "config.h"
#include "ewk_security_origin.h"
#include "ApplicationCache.h"
#include "ApplicationCacheStorage.h"
#include "DatabaseTracker.h"
#include "SecurityOrigin.h"
......@@ -89,6 +90,11 @@ void ewk_security_origin_application_cache_quota_set(const Ewk_Security_Origin*
WebCore::cacheStorage().storeUpdatedQuotaForOrigin(origin->securityOrigin.get(), quota);
}
void ewk_security_origin_application_cache_clear(const Ewk_Security_Origin* origin)
{
WebCore::ApplicationCache::deleteCacheForOrigin(origin->securityOrigin.get());
}
Eina_List* ewk_security_origin_web_database_get_all(const Ewk_Security_Origin* origin)
{
Eina_List* databases = 0;
......@@ -117,6 +123,11 @@ void ewk_security_origin_free(Ewk_Security_Origin* origin)
delete origin;
}
Ewk_Security_Origin* ewk_security_origin_new_from_string(const char* url)
{
return ewk_security_origin_new(WebCore::SecurityOrigin::createFromString(String::fromUTF8(url)).get());
}
/**
* @internal
* Creates a EWK wrapper for WebCore Security Origin object.
......
......@@ -51,7 +51,7 @@ typedef struct _Ewk_Security_Origin Ewk_Security_Origin;
*
* @return the protocol scheme
*/
EAPI const char *ewk_security_origin_protocol_get(Ewk_Security_Origin *o);
EAPI const char *ewk_security_origin_protocol_get(Ewk_Security_Origin *o);
/**
* Returns the host of the security origin.
......@@ -63,7 +63,7 @@ EAPI const char *ewk_security_origin_protocol_get(Ewk_Security_Origin *o);
*
* @return the host domain
*/
EAPI const char *ewk_security_origin_host_get(Ewk_Security_Origin *o);
EAPI const char *ewk_security_origin_host_get(Ewk_Security_Origin *o);
/**
* Returns the port of the security origin.
......@@ -72,7 +72,7 @@ EAPI const char *ewk_security_origin_host_get(Ewk_Security_Origin *o);
*
* @return the port
*/
EAPI uint32_t ewk_security_origin_port_get(const Ewk_Security_Origin *o);
EAPI uint32_t ewk_security_origin_port_get(const Ewk_Security_Origin *o);
/**
* Retrieves the usage of a database for a security origin.
......@@ -84,7 +84,7 @@ EAPI uint32_t ewk_security_origin_port_get(const Ewk_Security_Origin *o);
*
* @return the usage in bytes
*/
EAPI uint64_t ewk_security_origin_web_database_usage_get(const Ewk_Security_Origin *o);
EAPI uint64_t ewk_security_origin_web_database_usage_get(const Ewk_Security_Origin *o);
/**
* Retrieves the quota of a database for a security origin.
......@@ -96,7 +96,7 @@ EAPI uint64_t ewk_security_origin_web_database_usage_get(const Ewk_Security_
*
* @return the quota in bytes
*/
EAPI uint64_t ewk_security_origin_web_database_quota_get(const Ewk_Security_Origin *o);
EAPI uint64_t ewk_security_origin_web_database_quota_get(const Ewk_Security_Origin *o);
/**
* Sets the database usage quota for a security origin.
......@@ -107,7 +107,7 @@ EAPI uint64_t ewk_security_origin_web_database_quota_get(const Ewk_Security_
* @param o security origin object
* @param quota the usage quota in bytes
*/
EAPI void ewk_security_origin_web_database_quota_set(const Ewk_Security_Origin *o, uint64_t quota);
EAPI void ewk_security_origin_web_database_quota_set(const Ewk_Security_Origin *o, uint64_t quota);
/**
* Sets the application cache usage quota for a security origin.
......@@ -115,7 +115,14 @@ EAPI void ewk_security_origin_web_database_quota_set(const Ewk_Security_
* @param o security origin object
* @param quota the usage quota in bytes
*/
EAPI void ewk_security_origin_application_cache_quota_set(const Ewk_Security_Origin *o, int64_t quota);
EAPI void ewk_security_origin_application_cache_quota_set(const Ewk_Security_Origin *o, int64_t quota);
/**
* Clears the application cache for a security origin.
*
* @param o security origin object.
*/
EAPI void ewk_security_origin_application_cache_clear(const Ewk_Security_Origin *o);
/**
* Return the list of web databases in the security origin.
......@@ -133,14 +140,24 @@ EAPI void ewk_security_origin_application_cache_quota_set(const Ewk_Secu
* @see ewk_web_database_free()
* @see ewk_web_database_list_free()
*/
EAPI Eina_List *ewk_security_origin_web_database_get_all(const Ewk_Security_Origin *o);
EAPI Eina_List *ewk_security_origin_web_database_get_all(const Ewk_Security_Origin *o);
/**
* Release all resources allocated by a security origin object.
*
* @param o security origin object
*/
EAPI void ewk_security_origin_free(Ewk_Security_Origin *o);
EAPI void ewk_security_origin_free(Ewk_Security_Origin *o);
/**
* Creates a security origin for a url.
*
* @param url the url for the security origin.
*
* @return the security origin object
*/
EAPI Ewk_Security_Origin *ewk_security_origin_new_from_string(const char *url);
#ifdef __cplusplus
}
......
2012-05-31 Jussi Kukkonen <jussi.kukkonen@intel.com>
[EFL][DRT] LayoutTestController does not implement clearApplicationCacheForOrigin
https://bugs.webkit.org/show_bug.cgi?id=86195
Reviewed by Gustavo Noronha Silva.
Implement clearApplicationCacheForOrigin in EFL
LayoutTestController.
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::clearApplicationCacheForOrigin):
2012-05-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5)
......
......@@ -578,10 +578,11 @@ void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quo
ewk_security_origin_free(origin);
}
void LayoutTestController::clearApplicationCacheForOrigin(OpaqueJSString*)
void LayoutTestController::clearApplicationCacheForOrigin(OpaqueJSString* url)
{
// FIXME: Implement to support deleting all application caches for an origin.
notImplemented();
Ewk_Security_Origin* origin = ewk_security_origin_new_from_string(url->ustring().utf8().data());
ewk_security_origin_application_cache_clear(origin);
ewk_security_origin_free(origin);
}
long long LayoutTestController::localStorageDiskUsageForOrigin(JSStringRef)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment