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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java

Issue 13510002: Fix the flaky full screen video tests by providing our own clickView; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 9 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 | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
index 795a62c9a0cf8de5322a647d9a14e1ccee162936..bc632c5a86aa14254a8708f6a188d09919009533 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
@@ -4,12 +4,12 @@
package org.chromium.android_webview.test;
-import android.test.suitebuilder.annotation.LargeTest;
-import android.test.TouchUtils;
+import android.test.suitebuilder.annotation.SmallTest;
import android.view.KeyEvent;
import org.chromium.android_webview.test.util.VideoTestWebServer;
import org.chromium.base.test.util.Feature;
+import org.chromium.content.browser.test.util.TouchCommon;
/**
* Test WebChromeClient::onShow/HideCustomView.
@@ -17,7 +17,7 @@ import org.chromium.base.test.util.Feature;
public class AwContentsClientFullScreenVideoTest extends AwTestBase {
@Feature({"AndroidWebView"})
- @LargeTest
+ @SmallTest
public void testOnShowAndHideCustomView() throws Throwable {
FullScreenVideoTestAwContentsClient contentsClient =
new FullScreenVideoTestAwContentsClient(getActivity());
@@ -30,10 +30,9 @@ public class AwContentsClientFullScreenVideoTest extends AwTestBase {
loadUrlSync(testContainerView.getAwContents(),
contentsClient.getOnPageFinishedHelper(),
webServer.getFullScreenVideoTestURL());
- // Temporary code to figure out minimal wait time for page show up.
- // see crbug/224923.
- Thread.sleep(10 * 1000);
- TouchUtils.clickView(AwContentsClientFullScreenVideoTest.this, testContainerView);
+ Thread.sleep(5 * 1000);
+ TouchCommon touchCommon = new TouchCommon(this);
+ touchCommon.singleClickView(testContainerView);
contentsClient.waitForCustomViewShown();
getInstrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);
contentsClient.waitForCustomViewHidden();
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698