| 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..7313eac9a3b767fb0e1ca43c40db5a9876767d8c 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
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright 2017 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.
|
|
|
| @@ -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());
|
| }
|
| }
|
|
|