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

Unified Diff: android_webview/tools/system_webview_shell/layout_tests/src/org/chromium/webview_shell/test/WebViewLayoutActivityTestRule.java

Issue 2266353003: [EXAMPLE] Change WebView Layout Test to Android JUnit 4 style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix errors Created 4 years, 4 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/tools/system_webview_shell/layout_tests/src/org/chromium/webview_shell/test/WebViewLayoutActivityTestRule.java
diff --git a/android_webview/tools/system_webview_shell/layout_tests/src/org/chromium/webview_shell/test/WebViewLayoutActivityTestRule.java b/android_webview/tools/system_webview_shell/layout_tests/src/org/chromium/webview_shell/test/WebViewLayoutActivityTestRule.java
new file mode 100644
index 0000000000000000000000000000000000000000..44e30965b0b36dc85a6077b43f796574980c6eae
--- /dev/null
+++ b/android_webview/tools/system_webview_shell/layout_tests/src/org/chromium/webview_shell/test/WebViewLayoutActivityTestRule.java
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.webview_shell.test;
+
+import android.app.Activity;
+import android.support.test.rule.ActivityTestRule;
+
+public class WebViewLayoutActivityTestRule<T extends Activity> extends ActivityTestRule<T> {
+ private String mModeArgument;
+ private static final String MODE_REBASELINE = "rebaseline";
+
+ public WebViewLayoutActivityTestRule(Class<T> activityClass) {
+ super(activityClass);
+ }
+ public boolean isRebaseline() {
+ return mModeArgument != null ? mModeArgument.equals(MODE_REBASELINE) : false;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698