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

Unified Diff: content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java

Issue 2708243004: Auto convert content shell tests to JUnit4 (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellShellManagementTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java
diff --git a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java
index 5402b64a18f0434ca482833c578b88768031b316..59ef4cdfe39117007754f56ec40c21cebe18e8d9 100644
--- a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java
+++ b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java
@@ -6,24 +6,36 @@ package org.chromium.content_shell_apk;
import android.support.test.filters.SmallTest;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.Feature;
/**
* Example test that just starts the content shell.
*/
-public class ContentShellUrlTest extends ContentShellTestBase {
+@RunWith(BaseJUnit4ClassRunner.class)
+public class ContentShellUrlTest {
+ @Rule
+ public ContentShellActivityTestRule mActivityTestRule = new ContentShellActivityTestRule();
+
// URL used for base tests.
private static final String URL = "data:text";
+ @Test
@SmallTest
@Feature({"Main"})
public void testBaseStartup() throws Exception {
- ContentShellActivity activity = launchContentShellWithUrl(URL);
+ ContentShellActivity activity = mActivityTestRule.launchContentShellWithUrl(URL);
// Make sure the activity was created as expected.
- assertNotNull(activity);
+ Assert.assertNotNull(activity);
// Make sure that the URL is set as expected.
- assertEquals(URL, activity.getActiveShell().getContentViewCore().getWebContents().getUrl());
+ Assert.assertEquals(
+ URL, activity.getActiveShell().getContentViewCore().getWebContents().getUrl());
}
}
« no previous file with comments | « content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellShellManagementTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698