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

Unified Diff: android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/WebViewTestBase.java

Issue 2146713003: Refactor and add special test runner to support Espresso tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change after john and mike's comments Created 4 years, 5 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/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/WebViewTestBase.java
diff --git a/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/WebViewTestBase.java b/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/WebViewTestBase.java
deleted file mode 100644
index b0b8eed9c4ce067c4f438a2feb645a8425276ecc..0000000000000000000000000000000000000000
--- a/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/WebViewTestBase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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_ui_test.test;
-
-import android.content.Intent;
-import android.test.ActivityInstrumentationTestCase2;
-
-import org.chromium.webview_ui_test.WebViewUiTestActivity;
-
-/**
- * Base class for the WebView UI app.
- */
-public abstract class WebViewTestBase extends
- ActivityInstrumentationTestCase2<WebViewUiTestActivity> {
-
- private WebViewUiTestActivity mActivity;
-
- public WebViewTestBase() {
- super(WebViewUiTestActivity.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- startWebViewUiTestApp();
- }
-
- /**
- * Starts the WebView UI Test App
- */
- private void startWebViewUiTestApp() {
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- intent.setClass(getInstrumentation().getTargetContext(), WebViewUiTestActivity.class);
- intent.putExtra(WebViewUiTestActivity.EXTRA_TEST_LAYOUT_FILE, getLayout());
- setActivityIntent(intent);
- mActivity = (WebViewUiTestActivity) getActivity();
- }
-
- /**
- * Returns the activity under test.
- */
- protected WebViewUiTestActivity getWebViewActivity() {
- return mActivity;
- }
-
- /**
- * Returns the name of the layout used by the test class.
- */
- protected abstract String getLayout();
-}

Powered by Google App Engine
This is Rietveld 408576698