Diff
Modified: trunk/Tools/ChangeLog (139775 => 139776)
--- trunk/Tools/ChangeLog 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/ChangeLog 2013-01-15 20:49:36 UTC (rev 139776)
@@ -1,3 +1,32 @@
+2013-01-15 Jochen Eisinger <[email protected]>
+
+ [chromium] move WebDatabase related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106905
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::clearAllDatabases):
+ (WebTestRunner::WebTestDelegate::setDatabaseQuota):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::clearAllDatabases):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setDatabaseQuota):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::clearAllDatabases):
+ (WebViewHost::setDatabaseQuota):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
2013-01-15 Tim 'mithro' Ansell <[email protected]>
Renaming CleanWorkingDirectory step to DiscardLocalChanges to make
Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp (139775 => 139776)
--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp 2013-01-15 20:49:36 UTC (rev 139776)
@@ -104,7 +104,6 @@
bindMethod("setMockSpeechRecognitionError", &DRTTestRunner::setMockSpeechRecognitionError);
bindMethod("wasMockSpeechRecognitionAborted", &DRTTestRunner::wasMockSpeechRecognitionAborted);
#endif
- bindMethod("clearAllDatabases", &DRTTestRunner::clearAllDatabases);
#if ENABLE(POINTER_LOCK)
bindMethod("didAcquirePointerLock", &DRTTestRunner::didAcquirePointerLock);
bindMethod("didLosePointerLock", &DRTTestRunner::didLosePointerLock);
@@ -128,7 +127,6 @@
bindMethod("setAlwaysAcceptCookies", &DRTTestRunner::setAlwaysAcceptCookies);
bindMethod("setCloseRemainingWindowsWhenComplete", &DRTTestRunner::setCloseRemainingWindowsWhenComplete);
bindMethod("setCustomPolicyDelegate", &DRTTestRunner::setCustomPolicyDelegate);
- bindMethod("setDatabaseQuota", &DRTTestRunner::setDatabaseQuota);
bindMethod("setGeolocationPermission", &DRTTestRunner::setGeolocationPermission);
bindMethod("setMockDeviceOrientation", &DRTTestRunner::setMockDeviceOrientation);
bindMethod("setMockGeolocationPositionUnavailableError", &DRTTestRunner::setMockGeolocationPositionUnavailableError);
@@ -401,9 +399,6 @@
webkit_support::SetAcceptAllCookies(false);
- // Reset the default quota for each origin to 5MB
- webkit_support::SetDatabaseQuota(5 * 1024 * 1024);
-
setlocale(LC_ALL, "");
if (m_closeRemainingWindows)
@@ -587,19 +582,6 @@
result->setNull();
}
-void DRTTestRunner::clearAllDatabases(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- webkit_support::ClearAllDatabases();
-}
-
-void DRTTestRunner::setDatabaseQuota(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if ((arguments.size() >= 1) && arguments[0].isNumber())
- webkit_support::SetDatabaseQuota(arguments[0].toInt32());
-}
-
void DRTTestRunner::setPOSIXLocale(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h (139775 => 139776)
--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h 2013-01-15 20:49:36 UTC (rev 139776)
@@ -131,11 +131,6 @@
void display(const CppArgumentList&, CppVariant*);
void displayInvalidatedRegion(const CppArgumentList&, CppVariant*);
- // Clears all databases.
- void clearAllDatabases(const CppArgumentList&, CppVariant*);
- // Sets the default quota for all origins
- void setDatabaseQuota(const CppArgumentList&, CppVariant*);
-
// Calls setlocale(LC_ALL, ...) for a specified locale.
// Resets between tests.
void setPOSIXLocale(const CppArgumentList&, CppVariant*);
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h (139775 => 139776)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h 2013-01-15 20:49:36 UTC (rev 139776)
@@ -85,6 +85,8 @@
virtual void showDevTools() { }
virtual void closeDevTools() { }
virtual void evaluateInWebInspector(long, const std::string&) { }
+ virtual void clearAllDatabases() { }
+ virtual void setDatabaseQuota(int) { }
};
}
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp (139775 => 139776)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp 2013-01-15 20:49:36 UTC (rev 139776)
@@ -178,6 +178,8 @@
bindMethod("showWebInspector", &TestRunner::showWebInspector);
bindMethod("closeWebInspector", &TestRunner::closeWebInspector);
bindMethod("evaluateInWebInspector", &TestRunner::evaluateInWebInspector);
+ bindMethod("clearAllDatabases", &TestRunner::clearAllDatabases);
+ bindMethod("setDatabaseQuota", &TestRunner::setDatabaseQuota);
// Properties.
bindProperty("workerThreadCount", &TestRunner::workerThreadCount);
@@ -244,6 +246,9 @@
WebFontRendering::setSubpixelPositioning(false);
#endif
+ // Reset the default quota for each origin to 5MB
+ m_delegate->setDatabaseQuota(5 * 1024 * 1024);
+
m_dumpEditingCallbacks = false;
m_dumpAsText = false;
m_generatePixelResults = true;
@@ -1295,6 +1300,19 @@
m_delegate->evaluateInWebInspector(arguments[0].toInt32(), arguments[1].toString());
}
+void TestRunner::clearAllDatabases(const CppArgumentList& arguments, CppVariant* result)
+{
+ result->setNull();
+ m_delegate->clearAllDatabases();
+}
+
+void TestRunner::setDatabaseQuota(const CppArgumentList& arguments, CppVariant* result)
+{
+ result->setNull();
+ if ((arguments.size() >= 1) && arguments[0].isNumber())
+ m_delegate->setDatabaseQuota(arguments[0].toInt32());
+}
+
void TestRunner::dumpEditingCallbacks(const CppArgumentList&, CppVariant* result)
{
m_dumpEditingCallbacks = true;
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h (139775 => 139776)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h 2013-01-15 20:49:36 UTC (rev 139776)
@@ -331,6 +331,11 @@
// Allows layout tests to exec scripts at WebInspector side.
void evaluateInWebInspector(const CppArgumentList&, CppVariant*);
+ // Clears all databases.
+ void clearAllDatabases(const CppArgumentList&, CppVariant*);
+ // Sets the default quota for all origins
+ void setDatabaseQuota(const CppArgumentList&, CppVariant*);
+
///////////////////////////////////////////////////////////////////////////
// Properties
void workerThreadCount(CppVariant*);
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (139775 => 139776)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2013-01-15 20:49:36 UTC (rev 139776)
@@ -1069,6 +1069,16 @@
m_shell->drtDevToolsAgent()->evaluateInWebInspector(callID, script);
}
+void WebViewHost::clearAllDatabases()
+{
+ webkit_support::ClearAllDatabases();
+}
+
+void WebViewHost::setDatabaseQuota(int quota)
+{
+ webkit_support::SetDatabaseQuota(quota);
+}
+
// Public functions -----------------------------------------------------------
WebViewHost::WebViewHost(TestShell* shell)
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.h (139775 => 139776)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.h 2013-01-15 20:47:18 UTC (rev 139775)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.h 2013-01-15 20:49:36 UTC (rev 139776)
@@ -154,6 +154,8 @@
virtual void showDevTools() OVERRIDE;
virtual void closeDevTools() OVERRIDE;
virtual void evaluateInWebInspector(long, const std::string&) OVERRIDE;
+ virtual void clearAllDatabases() OVERRIDE;
+ virtual void setDatabaseQuota(int) OVERRIDE;
// NavigationHost
virtual bool navigate(const TestNavigationEntry&, bool reload);