Title: [128453] trunk
- Revision
- 128453
- Author
- [email protected]
- Date
- 2012-09-13 07:03:01 -0700 (Thu, 13 Sep 2012)
Log Message
[GTK] Clear application cache between tests in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=96543
Reviewed by Philippe Normand.
Source/WebKit/gtk:
Add a method to the DumpRenderTreeSupportGtk class that upon calling
clears the application cache and vacuums the database file.
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::clearApplicationCache):
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):
Tools:
Call the new DumpRenderTreeSupportGtk method to clear application cache
after each test.
Set the XDG_CACHE_HOME environment variable when running DumpRenderTree
as well. Currently it points to a subdirectory in the layout tests results
directory. At least on the builders this ensures an empty cache directory
with each test run.
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(runTest):
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort.setup_environ_for_server):
Modified Paths
Diff
Modified: trunk/Source/WebKit/gtk/ChangeLog (128452 => 128453)
--- trunk/Source/WebKit/gtk/ChangeLog 2012-09-13 13:46:08 UTC (rev 128452)
+++ trunk/Source/WebKit/gtk/ChangeLog 2012-09-13 14:03:01 UTC (rev 128453)
@@ -1,3 +1,18 @@
+2012-09-13 Zan Dobersek <[email protected]>
+
+ [GTK] Clear application cache between tests in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=96543
+
+ Reviewed by Philippe Normand.
+
+ Add a method to the DumpRenderTreeSupportGtk class that upon calling
+ clears the application cache and vacuums the database file.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::clearApplicationCache):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
2012-09-12 Siraj Razick <[email protected]>
[GTK] Update AcceleratedCompositingContextClutter to match AcceleratedCompositingContext.h API update
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp (128452 => 128453)
--- trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp 2012-09-13 13:46:08 UTC (rev 128452)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp 2012-09-13 14:03:01 UTC (rev 128453)
@@ -26,6 +26,7 @@
#include "AXObjectCache.h"
#include "AccessibilityObject.h"
#include "AnimationController.h"
+#include "ApplicationCacheStorage.h"
#include "CSSComputedStyleDeclaration.h"
#include "Chrome.h"
#include "ChromeClientGtk.h"
@@ -811,3 +812,9 @@
{
memoryCache()->evictResources();
}
+
+void DumpRenderTreeSupportGtk::clearApplicationCache()
+{
+ cacheStorage().empty();
+ cacheStorage().vacuumDatabaseFile();
+}
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h (128452 => 128453)
--- trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h 2012-09-13 13:46:08 UTC (rev 128452)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h 2012-09-13 14:03:01 UTC (rev 128453)
@@ -128,6 +128,7 @@
static void resetTrackedRepaints(WebKitWebFrame*);
static void clearMemoryCache();
+ static void clearApplicationCache();
private:
static bool s_drtRun;
Modified: trunk/Tools/ChangeLog (128452 => 128453)
--- trunk/Tools/ChangeLog 2012-09-13 13:46:08 UTC (rev 128452)
+++ trunk/Tools/ChangeLog 2012-09-13 14:03:01 UTC (rev 128453)
@@ -1,3 +1,23 @@
+2012-09-13 Zan Dobersek <[email protected]>
+
+ [GTK] Clear application cache between tests in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=96543
+
+ Reviewed by Philippe Normand.
+
+ Call the new DumpRenderTreeSupportGtk method to clear application cache
+ after each test.
+
+ Set the XDG_CACHE_HOME environment variable when running DumpRenderTree
+ as well. Currently it points to a subdirectory in the layout tests results
+ directory. At least on the builders this ensures an empty cache directory
+ with each test run.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (runTest):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.setup_environ_for_server):
+
2012-09-13 Tor Arne Vestbø <[email protected]>
[Qt] Make sure LIBS, PKGCONFIG, and QT, do not affect QtWebKit's prl file
Modified: trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp (128452 => 128453)
--- trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2012-09-13 13:46:08 UTC (rev 128452)
+++ trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2012-09-13 14:03:01 UTC (rev 128453)
@@ -770,6 +770,7 @@
WebCoreTestSupport::resetInternalsObject(webkit_web_frame_get_global_context(mainFrame));
DumpRenderTreeSupportGtk::clearMemoryCache();
+ DumpRenderTreeSupportGtk::clearApplicationCache();
// A blank load seems to be necessary to reset state after certain tests.
webkit_web_view_open(webView, "about:blank");
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py (128452 => 128453)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-09-13 13:46:08 UTC (rev 128452)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-09-13 14:03:01 UTC (rev 128453)
@@ -71,12 +71,8 @@
environment['AUDIO_RESOURCES_PATH'] = self._filesystem.join(self._config.webkit_base_dir(),
'Source', 'WebCore', 'platform',
'audio', 'resources')
+ environment['XDG_CACHE_HOME'] = self._filesystem.join(self.results_directory(), 'appcache')
self._copy_value_from_environ_if_set(environment, 'WEBKITOUTPUTDIR')
- if self.get_option('webkit_test_runner'):
- # FIXME: This is a workaround to ensure that testing with WebKitTestRunner is started with
- # a non-existing cache. This should be removed when (and if) it will be possible to properly
- # set the cache directory path through a WebKitWebContext.
- environment['XDG_CACHE_HOME'] = self._filesystem.join(self.results_directory(), 'appcache')
return environment
def _generate_all_test_configurations(self):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes