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

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: One more test needs to be excluded Created 5 years, 1 month 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 9dd82b182d2771363abe63dc68946a7797a17d31..22b041d56172694f67c1377cd686c625f4149d8c 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,12 +17,16 @@ 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.ThreadUtils;
import org.chromium.base.test.BaseActivityInstrumentationTestCase;
+import org.chromium.base.test.util.CommandLineFlags;
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.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.TimeUnit;
/**
* 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 = CommandLineFlags.Parameter.PARAMETER_TAG)}),
+ @ParameterizedTest(parameters = {
+ @Parameter(
+ tag = CommandLineFlags.Parameter.PARAMETER_TAG,
+ arguments = {
+ @Parameter.Argument(
+ name = CommandLineFlags.Parameter.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