Loading tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +11 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,9 @@ public class TestShellActivity extends Activity implements LayoutTestController static enum DumpDataType {DUMP_AS_TEXT, EXT_REPR, NO_OP} // String constants for use with layoutTestController.overridePreferences private final String WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED = "WebKitOfflineWebApplicationCacheEnabled"; private final String WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED = "WebKitOfflineWebApplicationCacheEnabled"; private final String WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY = "WebKitUsesPageCachePreferenceKey"; public class AsyncHandler extends Handler { @Override Loading Loading @@ -524,8 +526,14 @@ public class TestShellActivity extends Activity implements LayoutTestController // called the layoutTestController method. Currently, we just use the // WebView for the main frame. EventSender suffers from the same // problem. if (key.equals(WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED)) { if (WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED.equals(key)) { mWebView.getSettings().setAppCacheEnabled(value); } else if (WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY.equals(key)) { // Cache the maximum possible number of pages. mWebView.getSettings().setPageCacheCapacity(Integer.MAX_VALUE); } else { Log.w(LOGTAG, "LayoutTestController.overridePreference(): " + "Unsupported preference '" + key + "'"); } } Loading Loading @@ -879,6 +887,7 @@ public class TestShellActivity extends Activity implements LayoutTestController settings.setDomStorageEnabled(true); settings.setWorkersEnabled(false); settings.setXSSAuditorEnabled(false); settings.setPageCacheCapacity(0); } private WebView mWebView; Loading tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java +11 −5 Original line number Diff line number Diff line Loading @@ -394,6 +394,7 @@ public class LayoutTestsExecutor extends Activity { webViewSettings.setDomStorageEnabled(true); webViewSettings.setWorkersEnabled(false); webViewSettings.setXSSAuditorEnabled(false); webViewSettings.setPageCacheCapacity(0); // This is asynchronous, but it gets processed by WebCore before it starts loading pages. mCurrentWebView.useMockDeviceOrientation(); Loading Loading @@ -565,6 +566,7 @@ public class LayoutTestsExecutor extends Activity { /** String constants for use with layoutTestController.overridePreference() */ private final String WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED = "WebKitOfflineWebApplicationCacheEnabled"; private final String WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY = "WebKitUsesPageCachePreferenceKey"; Handler mLayoutTestControllerHandler = new Handler() { @Override Loading Loading @@ -609,12 +611,16 @@ public class LayoutTestsExecutor extends Activity { * WebView for the main frame. EventSender suffers from the same * problem. */ if (msg.getData().getString("key").equals( WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED)) { mCurrentWebView.getSettings().setAppCacheEnabled(msg.getData().getBoolean( "value")); String key = msg.getData().getString("key"); boolean value = msg.getData().getBoolean("value"); if (WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED.equals(key)) { mCurrentWebView.getSettings().setAppCacheEnabled(value); } else if (WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY.equals(key)) { // Cache the maximum possible number of pages. mCurrentWebView.getSettings().setPageCacheCapacity(Integer.MAX_VALUE); } else { Log.w(LOG_TAG, "MSG_OVERRIDE_PREFERENCE: unsupported preference!"); Log.w(LOG_TAG, "LayoutTestController.overridePreference(): " + "Unsupported preference '" + key + "'"); } break; Loading Loading
tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +11 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,9 @@ public class TestShellActivity extends Activity implements LayoutTestController static enum DumpDataType {DUMP_AS_TEXT, EXT_REPR, NO_OP} // String constants for use with layoutTestController.overridePreferences private final String WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED = "WebKitOfflineWebApplicationCacheEnabled"; private final String WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED = "WebKitOfflineWebApplicationCacheEnabled"; private final String WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY = "WebKitUsesPageCachePreferenceKey"; public class AsyncHandler extends Handler { @Override Loading Loading @@ -524,8 +526,14 @@ public class TestShellActivity extends Activity implements LayoutTestController // called the layoutTestController method. Currently, we just use the // WebView for the main frame. EventSender suffers from the same // problem. if (key.equals(WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED)) { if (WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED.equals(key)) { mWebView.getSettings().setAppCacheEnabled(value); } else if (WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY.equals(key)) { // Cache the maximum possible number of pages. mWebView.getSettings().setPageCacheCapacity(Integer.MAX_VALUE); } else { Log.w(LOGTAG, "LayoutTestController.overridePreference(): " + "Unsupported preference '" + key + "'"); } } Loading Loading @@ -879,6 +887,7 @@ public class TestShellActivity extends Activity implements LayoutTestController settings.setDomStorageEnabled(true); settings.setWorkersEnabled(false); settings.setXSSAuditorEnabled(false); settings.setPageCacheCapacity(0); } private WebView mWebView; Loading
tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java +11 −5 Original line number Diff line number Diff line Loading @@ -394,6 +394,7 @@ public class LayoutTestsExecutor extends Activity { webViewSettings.setDomStorageEnabled(true); webViewSettings.setWorkersEnabled(false); webViewSettings.setXSSAuditorEnabled(false); webViewSettings.setPageCacheCapacity(0); // This is asynchronous, but it gets processed by WebCore before it starts loading pages. mCurrentWebView.useMockDeviceOrientation(); Loading Loading @@ -565,6 +566,7 @@ public class LayoutTestsExecutor extends Activity { /** String constants for use with layoutTestController.overridePreference() */ private final String WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED = "WebKitOfflineWebApplicationCacheEnabled"; private final String WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY = "WebKitUsesPageCachePreferenceKey"; Handler mLayoutTestControllerHandler = new Handler() { @Override Loading Loading @@ -609,12 +611,16 @@ public class LayoutTestsExecutor extends Activity { * WebView for the main frame. EventSender suffers from the same * problem. */ if (msg.getData().getString("key").equals( WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED)) { mCurrentWebView.getSettings().setAppCacheEnabled(msg.getData().getBoolean( "value")); String key = msg.getData().getString("key"); boolean value = msg.getData().getBoolean("value"); if (WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED.equals(key)) { mCurrentWebView.getSettings().setAppCacheEnabled(value); } else if (WEBKIT_USES_PAGE_CACHE_PREFERENCE_KEY.equals(key)) { // Cache the maximum possible number of pages. mCurrentWebView.getSettings().setPageCacheCapacity(Integer.MAX_VALUE); } else { Log.w(LOG_TAG, "MSG_OVERRIDE_PREFERENCE: unsupported preference!"); Log.w(LOG_TAG, "LayoutTestController.overridePreference(): " + "Unsupported preference '" + key + "'"); } break; Loading