Chromium Code Reviews| Index: content/shell/android/javatests/src/org/chromium/content_shell/ContentShellUrlTest.java |
| diff --git a/content/shell/android/javatests/src/org/chromium/content_shell/ContentShellUrlTest.java b/content/shell/android/javatests/src/org/chromium/content_shell/ContentShellUrlTest.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..802c069b4e832f888bc15f5c4775efcaea0b9e29 |
| --- /dev/null |
| +++ b/content/shell/android/javatests/src/org/chromium/content_shell/ContentShellUrlTest.java |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2012 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.content_shell; |
| + |
| +import android.app.Activity; |
| +import android.test.ActivityInstrumentationTestCase2; |
| + |
| +/** |
| + * Example test that just starts the content shell. |
| + * <p> |
| + * TODO(klundberg) Expand this test to provide more useful tests. |
| + */ |
| +public class ContentShellUrlTest extends ContentShellTestBase<ContentShellActivity> { |
| + // URL used for base tests. |
| + private static final String URL = "data:text"; |
| + |
| + public ContentShellUrlTest() { |
| + super(org.chromium.content_shell.ContentShellActivity.class); |
| + } |
| + |
| + public void testBaseStartup() throws Exception { |
| + Activity activity = launchContentShellWithUrl(URL); |
| + |
| + // Make sure the activity was created as expected. |
| + assertNotNull(activity); |
| + assertTrue(activity instanceof ContentShellActivity); |
|
Ted C
2012/07/11 22:28:28
If you change launchContentShellWithUrl to return
cjhopman
2012/07/12 18:13:08
Done.
|
| + |
| + // Make sure that the URL is set as expected. |
| + ContentShellActivity contentShellActivity = (ContentShellActivity) activity; |
| + assertEquals(URL, |
| + contentShellActivity.getActiveShellView().getContentView().getUrl()); |
| + } |
| +} |