From 27c5fab5715fed6d97ccfdf2d631a3b3726570d3 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 21 Sep 2010 18:30:01 +0100 Subject: Reduce the AppCache maximum size to a more reasonable value in DumpRenderTree2 Without this change, any use of AppCache fails after the test http/tests/appcache/max-size.html has been run. The test in question passes, but seems to leave the database in a corrupted state, causing all future database transactions to fail. The only fix is to remove the database file. This behaviour is only observed with DumpRenderTree2, not DumpRenderTree, so I don't think this is a WebView problem. I'm not sure what the root cause is, but I think it make sense to submit this fix now in order to get the LayoutTests stable with DumpRenderTree2. Change-Id: I763c09406e66839676b839e3cdeba3b9427c1cb9 --- .../src/com/android/dumprendertree2/LayoutTestsExecutor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/DumpRenderTree2/src') diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java index 089af0d..97d7cca 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java @@ -382,7 +382,9 @@ public class LayoutTestsExecutor extends Activity { WebSettings webViewSettings = webView.getSettings(); webViewSettings.setAppCacheEnabled(true); webViewSettings.setAppCachePath(getApplicationContext().getCacheDir().getPath()); - webViewSettings.setAppCacheMaxSize(Long.MAX_VALUE); + // Use of larger values causes unexplained AppCache database corruption. + // TODO: Investigate what's really going on here. + webViewSettings.setAppCacheMaxSize(100 * 1024 * 1024); webViewSettings.setJavaScriptEnabled(true); webViewSettings.setJavaScriptCanOpenWindowsAutomatically(true); webViewSettings.setSupportMultipleWindows(true); -- cgit v1.1