2011-01-24 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jan 2011 06:15:01 +0000 (06:15 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jan 2011 06:15:01 +0000 (06:15 +0000)
        Reviewed by Dan Bernstein.

        Implement database quota callback to fix storage tests on WebKit2 bot
        https://bugs.webkit.org/show_bug.cgi?id=53064

        * WebKitTestRunner/TestController.cpp:
        (WTR::exceededDatabaseQuota):
        (WTR::TestController::createOtherPage):
        (WTR::TestController::initialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp

index e5c64db79e19e32a0091db4bbb4b9080c2c011fe..533d908cf9e950a71992ca6a0176b63e295e0302 100644 (file)
@@ -1,3 +1,15 @@
+2011-01-24  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Implement database quota callback to fix storage tests on WebKit2 bot
+        https://bugs.webkit.org/show_bug.cgi?id=53064
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::exceededDatabaseQuota):
+        (WTR::TestController::createOtherPage):
+        (WTR::TestController::initialize):
+
 2011-01-24  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Anders Carlsson.
 2011-01-24  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Anders Carlsson.
index 23a873286061b3a86c769acc40399b3a031c7776..5d65d4391f498b08e90b31b80e52a6b05ff4bab5 100644 (file)
@@ -29,8 +29,8 @@
 #include "StringFunctions.h"
 #include "TestInvocation.h"
 #include <cstdio>
 #include "StringFunctions.h"
 #include "TestInvocation.h"
 #include <cstdio>
-#include <WebKit2/WKPageGroup.h>
 #include <WebKit2/WKContextPrivate.h>
 #include <WebKit2/WKContextPrivate.h>
+#include <WebKit2/WKPageGroup.h>
 #include <WebKit2/WKPreferencesPrivate.h>
 #include <WebKit2/WKRetainPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <WebKit2/WKPreferencesPrivate.h>
 #include <WebKit2/WKRetainPtr.h>
 #include <wtf/PassOwnPtr.h>
@@ -104,6 +104,13 @@ static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKF
     return true;
 }
 
     return true;
 }
 
+static unsigned long long exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef, WKStringRef, unsigned long long, unsigned long long, unsigned long long, const void*)
+{
+    static const unsigned long long defaultQuota = 5 * 1024 * 1024;    
+    return defaultQuota;
+}
+
+
 void TestController::runModal(WKPageRef page, const void* clientInfo)
 {
     runModal(static_cast<PlatformWebView*>(const_cast<void*>(clientInfo)));
 void TestController::runModal(WKPageRef page, const void* clientInfo)
 {
     runModal(static_cast<PlatformWebView*>(const_cast<void*>(clientInfo)));
@@ -149,7 +156,7 @@ WKPageRef TestController::createOtherPage(WKPageRef oldPage, WKDictionaryRef, WK
         runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
         runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
-        0, // exceededDatabaseQuota
+        exceededDatabaseQuota,
         0, // runOpenPanel
         0, // decidePolicyForGeolocationPermissionRequest
         0, // headerHeight
         0, // runOpenPanel
         0, // decidePolicyForGeolocationPermissionRequest
         0, // headerHeight
@@ -281,7 +288,7 @@ void TestController::initialize(int argc, const char* argv[])
         runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
         runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
-        0, // exceededDatabaseQuota
+        exceededDatabaseQuota,
         0, // runOpenPanel
         0, // decidePolicyForGeolocationPermissionRequest
         0, // headerHeight
         0, // runOpenPanel
         0, // decidePolicyForGeolocationPermissionRequest
         0, // headerHeight