Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27c5fab5 authored by Steve Block's avatar Steve Block
Browse files

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
parent cdde57ae
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);