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

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

Issue 12047068: Add apk for running content_browsertests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.net.Uri; 8 import android.net.Uri;
9 9
10 import java.util.concurrent.TimeUnit; 10 import java.util.concurrent.TimeUnit;
11 11
12 import org.chromium.base.test.util.UrlUtils; 12 import org.chromium.base.test.util.UrlUtils;
13 import org.chromium.content.browser.test.util.DOMUtils; 13 import org.chromium.content.browser.test.util.DOMUtils;
14 import org.chromium.content.browser.test.util.JavaScriptUtils; 14 import org.chromium.content.browser.test.util.JavaScriptUtils;
15 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; 15 import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
16 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnPage FinishedHelper; 16 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnPage FinishedHelper;
17 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnStar tContentIntentHelper; 17 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnStar tContentIntentHelper;
18 import org.chromium.content_shell.ContentShellActivity;
19 import org.chromium.content_shell.ContentShellTestBase; 18 import org.chromium.content_shell.ContentShellTestBase;
20 19
21 /** 20 /**
22 * Base class for content detection test suites. 21 * Base class for content detection test suites.
23 */ 22 */
24 public class ContentDetectionTestBase extends ContentShellTestBase { 23 public class ContentDetectionTestBase extends ContentShellTestBase {
25 24
26 private static final int WAIT_TIMEOUT_SECONDS = 10; 25 private static final int WAIT_TIMEOUT_SECONDS = 10;
27 26
28 private TestCallbackHelperContainer mCallbackHelper; 27 private TestCallbackHelperContainer mCallbackHelper;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 int currentCallCount = onPageFinishedHelper.getCallCount(); 88 int currentCallCount = onPageFinishedHelper.getCallCount();
90 89
91 DOMUtils.scrollNodeIntoView(getContentView(), callbackHelperContainer, i d); 90 DOMUtils.scrollNodeIntoView(getContentView(), callbackHelperContainer, i d);
92 DOMUtils.clickNode(this, getContentView(), callbackHelperContainer, id); 91 DOMUtils.clickNode(this, getContentView(), callbackHelperContainer, id);
93 92
94 onPageFinishedHelper.waitForCallback(currentCallCount, 1, WAIT_TIMEOUT_S ECONDS, 93 onPageFinishedHelper.waitForCallback(currentCallCount, 1, WAIT_TIMEOUT_S ECONDS,
95 TimeUnit.SECONDS); 94 TimeUnit.SECONDS);
96 getInstrumentation().waitForIdleSync(); 95 getInstrumentation().waitForIdleSync();
97 } 96 }
98 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698