| Index: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java
|
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java
|
| index 25b1b03373c05538a95bd7dace2482eb223168ac..a05310216086a9968f6ac5a0ab93181e3755e5a2 100644
|
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java
|
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java
|
| @@ -8,10 +8,9 @@ import android.test.suitebuilder.annotation.SmallTest;
|
| import android.view.View;
|
|
|
| import org.chromium.android_webview.AwContents;
|
| -import org.chromium.android_webview.test.util.VideoTestWebServer;
|
| import org.chromium.base.test.util.Feature;
|
| import org.chromium.content.browser.test.util.CallbackHelper;
|
| -import org.chromium.content.browser.test.util.TouchCommon;
|
| +import org.chromium.content.browser.test.util.DOMUtils;
|
|
|
| import java.util.concurrent.TimeUnit;
|
| import java.util.concurrent.TimeoutException;
|
| @@ -28,6 +27,10 @@ import java.util.concurrent.TimeoutException;
|
| */
|
| public class AwContentsClientGetVideoLoadingProgressViewTest extends AwTestBase
|
| implements View.OnAttachStateChangeListener {
|
| + private static final String VIDEO_TEST_URL =
|
| + "file:///android_asset/full_screen_video_test.html";
|
| + // This value must be kept in sync with the string in full_screen_video_test.html
|
| + private static final String CUSTOM_FULLSCREEN_CONTROL_ID = "fullscreenControl";
|
| private CallbackHelper mViewAttachedCallbackHelper = new CallbackHelper();
|
|
|
| @Override
|
| @@ -45,7 +48,6 @@ public class AwContentsClientGetVideoLoadingProgressViewTest extends AwTestBase
|
| TimeUnit.MILLISECONDS);
|
| }
|
|
|
| -
|
| @Feature({"AndroidWebView"})
|
| @SmallTest
|
| public void testGetVideoLoadingProgressView() throws Throwable {
|
| @@ -64,17 +66,9 @@ public class AwContentsClientGetVideoLoadingProgressViewTest extends AwTestBase
|
| final AwContents awContents = testContainerView.getAwContents();
|
| awContents.getSettings().setFullscreenSupported(true);
|
| enableJavaScriptOnUiThread(awContents);
|
| - VideoTestWebServer webServer = new VideoTestWebServer(
|
| - getInstrumentation().getTargetContext());
|
| - try {
|
| - loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(),
|
| - webServer.getFullScreenVideoTestURL());
|
| - Thread.sleep(5 * 1000);
|
| - TouchCommon touchCommon = new TouchCommon(this);
|
| - touchCommon.singleClickView(testContainerView);
|
| - waitForViewAttached();
|
| - } finally {
|
| - if (webServer != null) webServer.getTestWebServer().shutdown();
|
| - }
|
| + loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(), VIDEO_TEST_URL);
|
| + Thread.sleep(5 * 1000);
|
| + DOMUtils.clickNode(this, awContents.getContentViewCore(), CUSTOM_FULLSCREEN_CONTROL_ID);
|
| + waitForViewAttached();
|
| }
|
| }
|
|
|