Chromium Code Reviews| 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 69e1ce416fd7a642bb954a7347a7c4ecbafcc148..b7223e06dd965191e887092d143e026bcf9485e5 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 |
| @@ -55,6 +55,8 @@ public class KeySystemTest extends AwTestBase { |
| } |
| private String getKeySystemTestPage() { |
| + // requestMediaKeySystemAccess() provides 2 different configurations |
| + // as encrypted webm is only supported on Lollipop+. |
|
xhwang
2017/02/02 23:12:49
Thanks! Could you also provide info on why we can'
jrummell
2017/02/03 22:30:24
Done.
|
| return "<html> <script>" |
| + "var result;" |
| + "function success(keySystemAccess) {" |
| @@ -64,8 +66,13 @@ public class KeySystemTest extends AwTestBase { |
| + " result = error.name;" |
| + "}" |
| + "function isKeySystemSupported(keySystem) {" |
| - + " navigator.requestMediaKeySystemAccess(keySystem, [{}]).then(" |
| - + " success, failure);" |
| + + " navigator.requestMediaKeySystemAccess(" |
| + + " keySystem, " |
| + + " [{audioCapabilities:" |
| + + " [{contentType: 'audio/webm; codec=\"vorbis\"'}]}, " |
| + + " {videoCapabilities:" |
| + + " [{contentType: 'video/mp4; codecs=\"avc1.4D000C\"'}]}])" |
| + + " .then(success, failure);" |
| + "}" |
| + "function areProprietaryCodecsSupported() {" |
| + " var video = document.createElement('video');" |