| Index: android_webview/javatests/src/org/chromium/android_webview/test/util/VideoTestUtil.java
|
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/util/VideoTestUtil.java b/android_webview/javatests/src/org/chromium/android_webview/test/util/VideoTestUtil.java
|
| index 5df2a0386b2174db68e1f5586f3150975d86ab86..529d730a2e5502b416bcb30e70b1cc3d71649650 100644
|
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/util/VideoTestUtil.java
|
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/util/VideoTestUtil.java
|
| @@ -20,12 +20,12 @@ public class VideoTestUtil {
|
| * @return true if the event happened,
|
| * @throws Throwable throw exception if timeout.
|
| */
|
| - public static boolean runVideoTest(final AwTestBase testCase, final boolean requiredUserGesture,
|
| - long waitTime) throws Throwable {
|
| + public static boolean runVideoTest(final AwTestBase testCase, final boolean requiredUserGesture,
|
| + long waitTime) throws Throwable {
|
| final JavascriptEventObserver observer = new JavascriptEventObserver();
|
| TestAwContentsClient client = new TestAwContentsClient();
|
| final AwContents awContents =
|
| - testCase.createAwTestContainerViewOnMainSync(client).getAwContents();
|
| + testCase.createAwTestContainerViewOnMainSync(client).getAwContents();
|
| testCase.getInstrumentation().runOnMainSync(new Runnable() {
|
| @Override
|
| public void run() {
|
| @@ -38,14 +38,14 @@ public class VideoTestUtil {
|
| VideoTestWebServer webServer = new VideoTestWebServer(testCase.getActivity());
|
| try {
|
| String data = "<html><head><script>" +
|
| - "addEventListener('DOMContentLoaded', function() { " +
|
| - " document.getElementById('video').addEventListener('play', function() { " +
|
| - " javaObserver.notifyJava(); " +
|
| - " }, false); " +
|
| - "}, false); " +
|
| - "</script></head><body>" +
|
| - "<video id='video' autoplay control src='" +
|
| - webServer.getOnePixelOneFrameWebmURL() + "' /> </body></html>";
|
| + "addEventListener('DOMContentLoaded', function() { " +
|
| + " document.getElementById('video').addEventListener('play', function() { " +
|
| + " javaObserver.notifyJava(); " +
|
| + " }, false); " +
|
| + "}, false); " +
|
| + "</script></head><body>" +
|
| + "<video id='video' autoplay control src='" +
|
| + webServer.getOnePixelOneFrameWebmURL() + "' /> </body></html>";
|
| testCase.loadDataAsync(awContents, data, "text/html", false);
|
| return observer.waitForEvent(waitTime);
|
| } finally {
|
|
|