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

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

Issue 667143002: [aw] Software mode tests for fullscreen API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fixPowerBlockerNonMedia
Patch Set: Rebase and move check for real Created 6 years, 1 month 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 | « android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java ('k') | no next file » | 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/FullScreenVideoTestAwContentsClient.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java b/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java
index c1a82b8f554d7e51f1a0e56d1b0e1370e22a2d3f..2143c466e904f35d6a036fd5e98a41af8c8d862a 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java
@@ -27,17 +27,25 @@ public class FullScreenVideoTestAwContentsClient extends TestAwContentsClient {
private CallbackHelper mOnShowCustomViewCallbackHelper = new CallbackHelper();
private CallbackHelper mOnHideCustomViewCallbackHelper = new CallbackHelper();
- private Activity mActivity;
+ private final Activity mActivity;
+ private final boolean mAllowHardwareAcceleration;
private View mCustomView;
private WebChromeClient.CustomViewCallback mExitCallback;
- public FullScreenVideoTestAwContentsClient(Activity activity) {
+ public FullScreenVideoTestAwContentsClient(Activity activity,
+ boolean allowHardwareAcceleration) {
mActivity = activity;
+ mAllowHardwareAcceleration = allowHardwareAcceleration;
}
@Override
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
mCustomView = view;
+ if (!mAllowHardwareAcceleration) {
+ // The hardware emulation in the testing infrastructure is not perfect, and this is
+ // required to work-around some of the limitations.
+ mCustomView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
+ }
mExitCallback = callback;
mActivity.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698