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 e5c64db..533d908 100644 (file)
@@ -1,5 +1,17 @@
 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.
 
         Use designated temp directory for the database for WebKit2
index 23a8732..5d65d43 100644 (file)
@@ -29,8 +29,8 @@
 #include "StringFunctions.h"
 #include "TestInvocation.h"
 #include <cstdio>
-#include <WebKit2/WKPageGroup.h>
 #include <WebKit2/WKContextPrivate.h>
+#include <WebKit2/WKPageGroup.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;
 }
 
+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)));
@@ -149,7 +156,7 @@ WKPageRef TestController::createOtherPage(WKPageRef oldPage, WKDictionaryRef, WK
         runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
-        0, // exceededDatabaseQuota
+        exceededDatabaseQuota,
         0, // runOpenPanel
         0, // decidePolicyForGeolocationPermissionRequest
         0, // headerHeight
@@ -281,7 +288,7 @@ void TestController::initialize(int argc, const char* argv[])
         runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
-        0, // exceededDatabaseQuota
+        exceededDatabaseQuota,
         0, // runOpenPanel
         0, // decidePolicyForGeolocationPermissionRequest
         0, // headerHeight