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

Unified Diff: chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java

Issue 2232383002: [TTS] Delay instrumentation tests at startup for flakes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved control of the delay to CS, new method in test base rather than new behavior. 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
Index: chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java
index bb4fa79ca6a82c793484942d646035dae9b679af..74997749dc144cf796e901ad130d0f71dae72b66 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java
@@ -412,6 +412,17 @@ public abstract class ChromeActivityTestCaseBase<T extends ChromeActivity>
}
/**
+ * Like {@code #startMainActivityWithURL} except with an initial specified delay.
+ */
+ protected void startMainActivityWithDelay(String url, long delayMs)
+ throws InterruptedException {
+ // 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.
+ Thread.sleep(delayMs);
+ startMainActivityWithURL(url);
+ }
+
+ /**
* Starts the Main activity and open a blank page.
* This is faster and less flakyness-prone than starting on the NTP.
*/

Powered by Google App Engine
This is Rietveld 408576698