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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/ContentViewTestBase.java

Issue 406023002: Restructuring NavigationController functionalities from ContentViewCore to NavigationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch with findbugs_known_bugs.txt changes. Created 6 years, 3 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.util.Log; 7 import android.util.Log;
8 8
9 import org.chromium.base.test.util.UrlUtils; 9 import org.chromium.base.test.util.UrlUtils;
10 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; 10 import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
11 import org.chromium.content_public.browser.LoadUrlParams;
11 import org.chromium.content_shell_apk.ContentShellActivity; 12 import org.chromium.content_shell_apk.ContentShellActivity;
12 import org.chromium.content_shell_apk.ContentShellTestBase; 13 import org.chromium.content_shell_apk.ContentShellTestBase;
13 14
15 /**
16 * Provides test environment for ContentView Test Shell.
17 * This is a helper class for Content Shell tests.
18 */
14 public class ContentViewTestBase extends ContentShellTestBase { 19 public class ContentViewTestBase extends ContentShellTestBase {
15 20
16 protected TestCallbackHelperContainer mTestCallbackHelperContainer; 21 protected TestCallbackHelperContainer mTestCallbackHelperContainer;
17 22
18 /** 23 /**
19 * Sets up the ContentView and injects the supplied object. Intended to be c alled from setUp(). 24 * Sets up the ContentView and injects the supplied object. Intended to be c alled from setUp().
20 */ 25 */
21 protected void setUpContentView(final Object object, final String name) thro ws Exception { 26 protected void setUpContentView(final Object object, final String name) thro ws Exception {
22 // This starts the activity, so must be called on the test thread. 27 // This starts the activity, so must be called on the test thread.
23 final ContentShellActivity activity = launchContentShellWithUrl( 28 final ContentShellActivity activity = launchContentShellWithUrl(
(...skipping 24 matching lines...) Expand all
48 /** 53 /**
49 * Loads data on the UI thread and blocks until onPageFinished is called. 54 * Loads data on the UI thread and blocks until onPageFinished is called.
50 * TODO(cramya): Move method to a separate util file once UiUtils.java moves into base. 55 * TODO(cramya): Move method to a separate util file once UiUtils.java moves into base.
51 */ 56 */
52 protected void loadDataSync(final ContentViewCore contentViewCore, final Str ing data, 57 protected void loadDataSync(final ContentViewCore contentViewCore, final Str ing data,
53 final String mimeType, final boolean isBase64Encoded) throws Throwab le { 58 final String mimeType, final boolean isBase64Encoded) throws Throwab le {
54 loadUrl(contentViewCore, mTestCallbackHelperContainer, LoadUrlParams.cre ateLoadDataParams( 59 loadUrl(contentViewCore, mTestCallbackHelperContainer, LoadUrlParams.cre ateLoadDataParams(
55 data, mimeType, isBase64Encoded)); 60 data, mimeType, isBase64Encoded));
56 } 61 }
57 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698