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

Unified Diff: android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/LoadDataTest.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/LoadDataTest.java
diff --git a/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/LoadDataTest.java b/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/LoadDataTest.java
deleted file mode 100644
index 108c3279c3845df6ac777426d5fef15c1ebf7713..0000000000000000000000000000000000000000
--- a/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/LoadDataTest.java
+++ /dev/null
@@ -1,50 +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.support.test.uiautomator.By;
-import android.support.test.uiautomator.UiDevice;
-import android.support.test.uiautomator.UiObject2;
-import android.support.test.uiautomator.Until;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.webkit.WebView;
-
-import org.chromium.webview_ui_test.R;
-
-/**
- * Tests for loadData API.
- */
-public class LoadDataTest extends WebViewTestBase {
-
- private static final long UI_TIMEOUT = 10 * 1000;
-
- @Override
- protected String getLayout() {
- return "fullscreen_webview";
- }
-
- /**
- * Test for loading HTML data and verifying it is displayed as expected.
- */
- @SmallTest
- public void testLoadDataHtml() {
-
- final String headerText = "HELLO WORLD";
-
- getInstrumentation().runOnMainSync(new Runnable() {
- @Override
- public void run() {
- WebView w = (WebView) getWebViewActivity().findViewById(R.id.webview);
- w.loadData(String.format("<html><body><h1>%s</h1></body></html>", headerText),
- "text/html", "utf-8");
- }
- });
-
- UiDevice device = UiDevice.getInstance(getInstrumentation());
- UiObject2 webViewUi = device.findObject(
- By.res(getWebViewActivity().getPackageName(), "webview"));
- assertTrue(webViewUi.wait(Until.hasObject(By.desc(headerText)), UI_TIMEOUT));
- }
-}

Powered by Google App Engine
This is Rietveld 408576698