Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.content_shell; | |
| 6 | |
| 7 import android.app.Activity; | |
| 8 import android.test.ActivityInstrumentationTestCase2; | |
| 9 | |
| 10 /** | |
| 11 * Example test that just starts the content shell. | |
| 12 * <p> | |
| 13 * TODO(klundberg) Expand this test to provide more useful tests. | |
| 14 */ | |
| 15 public class ContentShellUrlTest extends ContentShellTestBase<ContentShellActivi ty> { | |
| 16 // URL used for base tests. | |
| 17 private static final String URL = "data:text"; | |
| 18 | |
| 19 public ContentShellUrlTest() { | |
| 20 super(org.chromium.content_shell.ContentShellActivity.class); | |
| 21 } | |
| 22 | |
| 23 public void testBaseStartup() throws Exception { | |
| 24 Activity activity = launchContentShellWithUrl(URL); | |
| 25 | |
| 26 // Make sure the activity was created as expected. | |
| 27 assertNotNull(activity); | |
| 28 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.
| |
| 29 | |
| 30 // Make sure that the URL is set as expected. | |
| 31 ContentShellActivity contentShellActivity = (ContentShellActivity) activ ity; | |
| 32 assertEquals(URL, | |
| 33 contentShellActivity.getActiveShellView().getContentView().getUr l()); | |
| 34 } | |
| 35 } | |
| OLD | NEW |