Index: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
index c0f6387693aafafc62d5b9525364c00907348d8b..505ced9a97b9296dcc828b776019a386602bebb6 100644 |
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
@@ -35,6 +35,8 @@ public class AwTestBase |
protected static final int WAIT_TIMEOUT_SECONDS = 15; |
protected static final int CHECK_INTERVAL = 100; |
+ private boolean mQuirksMode = true; |
+ |
public AwTestBase() { |
super(AwTestRunnerActivity.class); |
} |
@@ -230,7 +232,7 @@ public class AwTestBase |
// See http://crbug.com/278106 |
testContainerView.initialize(new AwContents( |
mBrowserContext, testContainerView, testContainerView.getInternalAccessDelegate(), |
- awContentsClient, false, testDependencyFactory.createLayoutSizer(), true)); |
+ awContentsClient, false, testDependencyFactory.createLayoutSizer(), mQuirksMode)); |
return testContainerView; |
} |
@@ -257,6 +259,17 @@ public class AwTestBase |
}); |
} |
+ /** |
+ * Sets whether subsequent calls to create*AwTestContainerView will create a quirks-mode or |
+ * no-quirks-mode AwContents. |
+ * It is strongly advised to call this method only once, at the beginning of the test. It is |
+ * also advised to have two versions of the same test - one for quirks mode and one for |
+ * no quirks mode. |
+ */ |
+ protected void setQuirksMode(boolean value) { |
+ mQuirksMode = value; |
+ } |
+ |
protected String getTitleOnUiThread(final AwContents awContents) throws Exception { |
return runTestOnUiThreadAndGetResult(new Callable<String>() { |
@Override |