Chromium Code Reviews| 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..f53fa034394057815a98ace086a77a8f6cf8ed88 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 mInQuirksMode = 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(), mInQuirksMode)); |
| 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) { |
| + mInQuirksMode = value; |
|
mnaganov (inactive)
2013/09/06 21:07:04
nit: Perhaps, name the property "mQuirksMode" for
mkosiba (inactive)
2013/09/09 13:46:21
Done.
|
| + } |
| + |
| protected String getTitleOnUiThread(final AwContents awContents) throws Exception { |
| return runTestOnUiThreadAndGetResult(new Callable<String>() { |
| @Override |