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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java

Issue 2299883007: Remove video overlay support from WebView (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.Point; 8 import android.graphics.Point;
9 import android.net.http.SslError; 9 import android.net.http.SslError;
10 import android.os.Build; 10 import android.os.Build;
(...skipping 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 awSettings.setInitialPageScale(0); 2718 awSettings.setInitialPageScale(0);
2719 loadDataSync(awContents, onPageFinishedHelper, page, "text/html", false) ; 2719 loadDataSync(awContents, onPageFinishedHelper, page, "text/html", false) ;
2720 contentClient.getOnScaleChangedHelper().waitForCallback(onScaleChangedCa llCount); 2720 contentClient.getOnScaleChangedHelper().waitForCallback(onScaleChangedCa llCount);
2721 assertEquals(defaultScale, getPixelScaleOnUiThread(awContents), .01f); 2721 assertEquals(defaultScale, getPixelScaleOnUiThread(awContents), .01f);
2722 } 2722 }
2723 2723
2724 @DisableHardwareAccelerationForTest 2724 @DisableHardwareAccelerationForTest
2725 @LargeTest 2725 @LargeTest
2726 @Feature({"AndroidWebView", "Preferences"}) 2726 @Feature({"AndroidWebView", "Preferences"})
2727 public void testMediaPlaybackWithoutUserGesture() throws Throwable { 2727 public void testMediaPlaybackWithoutUserGesture() throws Throwable {
2728 assertTrue(VideoTestUtil.runVideoTest(this, false, false, WAIT_TIMEOUT_M S)); 2728 assertTrue(VideoTestUtil.runVideoTest(this, false, WAIT_TIMEOUT_MS));
2729 } 2729 }
2730 2730
2731 @DisableHardwareAccelerationForTest 2731 @DisableHardwareAccelerationForTest
2732 @SmallTest 2732 @SmallTest
2733 @Feature({"AndroidWebView", "Preferences"}) 2733 @Feature({"AndroidWebView", "Preferences"})
2734 public void testMediaPlaybackWithUserGesture() throws Throwable { 2734 public void testMediaPlaybackWithUserGesture() throws Throwable {
2735 // Wait for 5 second to see if video played. 2735 // Wait for 5 second to see if video played.
2736 assertFalse(VideoTestUtil.runVideoTest(this, true, false, scaleTimeout(5 000))); 2736 assertFalse(VideoTestUtil.runVideoTest(this, true, scaleTimeout(5000)));
2737 } 2737 }
2738 2738
2739 @SmallTest 2739 @SmallTest
2740 @Feature({"AndroidWebView", "Preferences"}) 2740 @Feature({"AndroidWebView", "Preferences"})
2741 public void testDefaultVideoPosterURL() throws Throwable { 2741 public void testDefaultVideoPosterURL() throws Throwable {
2742 final CallbackHelper videoPosterAccessedCallbackHelper = new CallbackHel per(); 2742 final CallbackHelper videoPosterAccessedCallbackHelper = new CallbackHel per();
2743 final String defaultVideoPosterUrl = "http://default_video_poster/"; 2743 final String defaultVideoPosterUrl = "http://default_video_poster/";
2744 TestAwContentsClient client = new TestAwContentsClient() { 2744 TestAwContentsClient client = new TestAwContentsClient() {
2745 @Override 2745 @Override
2746 public AwWebResourceResponse shouldInterceptRequest(AwWebResourceReq uest request) { 2746 public AwWebResourceResponse shouldInterceptRequest(AwWebResourceReq uest request) {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
3074 final AwContents awContents = webView.getAwContents(); 3074 final AwContents awContents = webView.getAwContents();
3075 runTestOnUiThread(new Runnable() { 3075 runTestOnUiThread(new Runnable() {
3076 @Override 3076 @Override
3077 public void run() { 3077 public void run() {
3078 awContents.getContentViewCore().sendDoubleTapForTest( 3078 awContents.getContentViewCore().sendDoubleTapForTest(
3079 SystemClock.uptimeMillis(), x, y); 3079 SystemClock.uptimeMillis(), x, y);
3080 } 3080 }
3081 }); 3081 });
3082 } 3082 }
3083 } 3083 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698