Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2189)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java

Issue 1414403002: Add CommandLineArgumentParameter and use it for WebView tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-cr-526885-read-nested-annotations
Patch Set: Final version Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c28d97e3896c056f16829f5c27efb0aa46df3c13..54351f74077eb560f655c5acc318d964aecbf48a 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
@@ -17,11 +17,15 @@ import org.chromium.android_webview.AwBrowserProcess;
import org.chromium.android_webview.AwContents;
import org.chromium.android_webview.AwContentsClient;
import org.chromium.android_webview.AwSettings;
+import org.chromium.android_webview.AwSwitches;
import org.chromium.android_webview.test.util.GraphicsTestUtils;
import org.chromium.android_webview.test.util.JSUtils;
import org.chromium.base.test.BaseActivityInstrumentationTestCase;
import org.chromium.base.test.util.InMemorySharedPreferences;
import org.chromium.base.test.util.MinAndroidSdkLevel;
+import org.chromium.base.test.util.parameter.Parameter;
+import org.chromium.base.test.util.parameter.ParameterizedTest;
+import org.chromium.base.test.util.parameter.parameters.CommandLineArgumentParameter;
import org.chromium.content.browser.test.util.CallbackHelper;
import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
@@ -40,8 +44,26 @@ import java.util.concurrent.atomic.AtomicReference;
/**
* A base class for android_webview tests. WebView only runs on KitKat and later,
* so make sure no one attempts to run the tests on earlier OS releases.
+ *
+ * By default, all tests run both in single-process mode, and with sandboxed renderer.
+ * If a test doesn't yet work with sandboxed renderer, an entire class, or an individual test
+ * method can be marked for single-process testing only by adding the following annotation:
+ *
+ * @ParameterizedTest.Set
*/
@MinAndroidSdkLevel(Build.VERSION_CODES.KITKAT)
+@ParameterizedTest.Set(tests = {
+ @ParameterizedTest(parameters = {
+ @Parameter(
+ tag = CommandLineArgumentParameter.PARAMETER_TAG)}),
+ @ParameterizedTest(parameters = {
+ @Parameter(
+ tag = CommandLineArgumentParameter.PARAMETER_TAG,
+ arguments = {
+ @Parameter.Argument(
+ name = CommandLineArgumentParameter.ADD_ARG,
+ stringArray = {AwSwitches.WEBVIEW_SANDBOXED_RENDERER})
+ })})})
public class AwTestBase
extends BaseActivityInstrumentationTestCase<AwTestRunnerActivity> {
public static final long WAIT_TIMEOUT_MS = scaleTimeout(15000);

Powered by Google App Engine
This is Rietveld 408576698