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

Side by Side Diff: content/shell/android/javatests/src/org/chromium/content_shell/ContentShellTestBase.java

Issue 10700167: Adds ContentShellTest.apk and very simple test. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 unified diff | Download patch
OLDNEW
(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.content.ComponentName;
8 import android.content.Intent;
9 import android.net.Uri;
10 import android.test.ActivityInstrumentationTestCase2;
11
12 /**
13 * Base test class for all ContentShell based tests.
14 */
15 public class ContentShellTestBase extends ActivityInstrumentationTestCase2<Conte ntShellActivity> {
16
17 public ContentShellTestBase() {
18 super(ContentShellActivity.class);
19 }
20
21 /**
22 * Starts the ContentShell activity and loads the given URL.
23 */
24 protected ContentShellActivity launchContentShellWithUrl(String url) {
25 Intent intent = new Intent(Intent.ACTION_MAIN);
26 intent.addCategory(Intent.CATEGORY_LAUNCHER);
27 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
28 intent.setData(Uri.parse(url));
29 intent.setComponent(new ComponentName(getInstrumentation().getTargetCont ext(),
30 ContentShellActivity.class));
31 return (ContentShellActivity) getInstrumentation().startActivitySync(int ent);
32 }
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698