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

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

Issue 1785173005: Revert of Flip proprietary codecs to false for Android chromium builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « android_webview/android_webview_tests.gypi ('k') | android_webview/test/BUILD.gn » ('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/KeySystemTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/KeySystemTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/KeySystemTest.java
index ff9e489f26885126a67f22f16942cc85ec2a082e..32ee9aa9af35d789157bf40f995062395e131608 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/KeySystemTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/KeySystemTest.java
@@ -4,7 +4,6 @@
package org.chromium.android_webview.test;
-import android.os.Build;
import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.android_webview.AwContents;
@@ -67,16 +66,12 @@
+ " navigator.requestMediaKeySystemAccess(keySystem, [{}]).then("
+ " success, failure);"
+ "}"
- + "function areProprietaryCodecsSupported() {"
- + " var video = document.createElement('video');"
- + " return video.canPlayType('video/mp4; codecs=\"avc1\"');"
- + "}"
+ "</script> </html>";
}
private String isKeySystemSupported(String keySystem) throws Exception {
- executeJavaScriptAndWaitForResult(
- mAwContents, mContentsClient, "isKeySystemSupported('" + keySystem + "')");
+ executeJavaScriptAndWaitForResult(mAwContents, mContentsClient,
+ "isKeySystemSupported('" + keySystem + "')");
poll(new Callable<Boolean>() {
@Override
@@ -86,12 +81,6 @@
});
return getResultFromJS();
- }
-
- private boolean areProprietaryCodecsSupported() throws Exception {
- String result = executeJavaScriptAndWaitForResult(
- mAwContents, mContentsClient, "areProprietaryCodecsSupported()");
- return !result.isEmpty();
}
private String getResultFromJS() {
@@ -105,18 +94,6 @@
return result;
}
- private String getPlatformKeySystemExpectations() throws Exception {
- // Android key systems only support non-proprietary codecs on Lollipop+.
- // When neither is true isKeySystemSupported() will return an error for
- // all key systems except ClearKey (which is handled by Chrome itself).
- if (!areProprietaryCodecsSupported()
- && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
- return "\"NotSupportedError\"";
- }
-
- return "\"supported\"";
- }
-
@Feature({"AndroidWebView"})
@SmallTest
public void testSupportClearKeySystem() throws Throwable {
@@ -126,8 +103,7 @@
@Feature({"AndroidWebView"})
@SmallTest
public void testSupportWidevineKeySystem() throws Throwable {
- assertEquals(
- getPlatformKeySystemExpectations(), isKeySystemSupported("com.widevine.alpha"));
+ assertEquals("\"supported\"", isKeySystemSupported("com.widevine.alpha"));
}
@Feature({"AndroidWebView"})
@@ -139,8 +115,7 @@
@Feature({"AndroidWebView"})
@SmallTest
public void testSupportPlatformKeySystem() throws Throwable {
- assertEquals(getPlatformKeySystemExpectations(),
- isKeySystemSupported("x-com.oem.test-keysystem"));
+ assertEquals("\"supported\"", isKeySystemSupported("x-com.oem.test-keysystem"));
}
@Feature({"AndroidWebView"})
« no previous file with comments | « android_webview/android_webview_tests.gypi ('k') | android_webview/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698