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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java

Issue 1223323012: Shore up application testing procedures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding function to avoid breaking downstream Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java
index f591b3ad41a9b63de153a3cbef65aab2ae17b5f3..394dc045e3c057862221a09063d6bd8bc4c628ac 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java
@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.document;
-import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
@@ -24,6 +23,7 @@ import org.chromium.chrome.browser.tabmodel.document.AsyncTabCreationParams;
import org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector;
import org.chromium.chrome.test.MultiActivityTestBase;
import org.chromium.chrome.test.util.ActivityUtils;
+import org.chromium.chrome.test.util.ApplicationTestUtils;
import org.chromium.chrome.test.util.ChromeTabUtils;
import org.chromium.chrome.test.util.DisableInTabbedMode;
import org.chromium.content.browser.test.util.Criteria;
@@ -54,30 +54,6 @@ public class DocumentModeTestBase extends MultiActivityTestBase {
}
}
- protected void launchHomeIntent(Context context) throws Exception {
- Intent startMain = new Intent(Intent.ACTION_MAIN);
- startMain.addCategory(Intent.CATEGORY_HOME);
- startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- context.startActivity(startMain);
- MultiActivityTestBase.waitUntilChromeInBackground();
- }
-
- protected void launchMainIntent(Context context) throws Exception {
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.setPackage(context.getPackageName());
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- context.startActivity(intent);
- MultiActivityTestBase.waitUntilChromeInForeground();
- }
-
- protected void fireViewIntent(Context context, Uri data) throws Exception {
- Intent intent = new Intent(Intent.ACTION_VIEW, data);
- intent.setClassName(context.getPackageName(), ChromeLauncherActivity.class.getName());
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- context.startActivity(intent);
- MultiActivityTestBase.waitUntilChromeInForeground();
- }
-
/**
* Launches three tabs via Intents with ACTION_VIEW.
*/
@@ -182,7 +158,7 @@ public class DocumentModeTestBase extends MultiActivityTestBase {
incognito ? IncognitoDocumentActivity.class : DocumentActivity.class, runnable);
assertTrue(ChromeApplication.isDocumentTabModelSelectorInitializedForTests());
- MultiActivityTestBase.waitUntilChromeInForeground();
+ ApplicationTestUtils.waitUntilChromeInForeground();
// Wait until the selector is ready and the Tabs have been added to the DocumentTabModel.
assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {

Powered by Google App Engine
This is Rietveld 408576698