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

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

Issue 12088031: Revert 179189 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_shell; 5 package org.chromium.content_shell;
6 6
7 import android.content.ComponentName; 7 import android.content.ComponentName;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.net.Uri; 9 import android.net.Uri;
10 import android.test.ActivityInstrumentationTestCase2; 10 import android.test.ActivityInstrumentationTestCase2;
11 import android.text.TextUtils; 11 import android.text.TextUtils;
12 12
13 import org.chromium.base.test.util.UrlUtils; 13 import org.chromium.base.test.util.UrlUtils;
14 import org.chromium.content.browser.ContentView; 14 import org.chromium.content.browser.ContentView;
15 import org.chromium.content.browser.ContentViewCore; 15 import org.chromium.content.browser.ContentViewCore;
16 import org.chromium.content.browser.LoadUrlParams; 16 import org.chromium.content.browser.LoadUrlParams;
17 import org.chromium.content.browser.test.util.CallbackHelper; 17 import org.chromium.content.browser.test.util.CallbackHelper;
18 import org.chromium.content.browser.test.util.Criteria; 18 import org.chromium.content.browser.test.util.Criteria;
19 import org.chromium.content.browser.test.util.CriteriaHelper; 19 import org.chromium.content.browser.test.util.CriteriaHelper;
20 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; 20 import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
21 import org.chromium.content_shell_apk.ContentShellActivity;
22 21
23 import java.util.concurrent.TimeUnit; 22 import java.util.concurrent.TimeUnit;
24 import java.util.concurrent.atomic.AtomicBoolean; 23 import java.util.concurrent.atomic.AtomicBoolean;
25 24
26 /** 25 /**
27 * Base test class for all ContentShell based tests. 26 * Base test class for all ContentShell based tests.
28 */ 27 */
29 public class ContentShellTestBase extends ActivityInstrumentationTestCase2<Conte ntShellActivity> { 28 public class ContentShellTestBase extends ActivityInstrumentationTestCase2<Conte ntShellActivity> {
30 29
31 /** The maximum time the waitForActiveShellToBeDoneLoading method will wait. */ 30 /** The maximum time the waitForActiveShellToBeDoneLoading method will wait. */
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 * @param action The action to be performed on the UI thread. 178 * @param action The action to be performed on the UI thread.
180 */ 179 */
181 protected void handleBlockingCallbackAction( 180 protected void handleBlockingCallbackAction(
182 CallbackHelper callbackHelper, Runnable action) throws Throwable { 181 CallbackHelper callbackHelper, Runnable action) throws Throwable {
183 int currentCallCount = callbackHelper.getCallCount(); 182 int currentCallCount = callbackHelper.getCallCount();
184 runTestOnUiThread(action); 183 runTestOnUiThread(action);
185 callbackHelper.waitForCallback( 184 callbackHelper.waitForCallback(
186 currentCallCount, 1, WAIT_PAGE_LOADING_TIMEOUT_SECONDS, TimeUnit .SECONDS); 185 currentCallCount, 1, WAIT_PAGE_LOADING_TIMEOUT_SECONDS, TimeUnit .SECONDS);
187 } 186 }
188 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698