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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java

Issue 2232383002: [TTS] Delay instrumentation tests at startup for flakes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just updated a comment. Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
index c6707dcdd1f2fab903fbd04632327e913d4ba523..e508c155754f176d43043e79d433977f47be2307 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
@@ -76,7 +76,7 @@ import java.util.concurrent.TimeoutException;
/**
* Tests the Contextual Search Manager using instrumentation tests.
*/
-@CommandLineFlags.Add(ContextualSearchFieldTrial.SUPPRESSION_TAPS + "=1000")
+
public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<ChromeActivity> {
private static final String TEST_PAGE =
@@ -90,6 +90,8 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
private static final String NORMAL_PRIORITY_SEARCH_ENDPOINT = "/search?";
private static final String LOW_PRIORITY_SEARCH_ENDPOINT = "/s?";
private static final String CONTEXTUAL_SEARCH_PREFETCH_PARAM = "&pf=c";
+ // The number of ms to delay startup for all tests.
+ private static final int ACTIVITY_STARTUP_DELAY_MS = 1000;
private ActivityMonitor mActivityMonitor;
private ContextualSearchFakeServer mFakeServer;
@@ -222,6 +224,10 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
@Override
public void startMainActivity() throws InterruptedException {
startMainActivityWithURL(mTestServer.getURL(TEST_PAGE));
+ // There's a problem with immediate startup that causes flakes due to the page not being
+ // ready, so specify a startup-delay of 1000 for legacy behavior. See crbug.com/635661.
+ // TODO(donnd): find a better way to wait for page-ready, or at least reduce the delay!
+ Thread.sleep(ACTIVITY_STARTUP_DELAY_MS);
}
//============================================================================================
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698