| Index: android_webview/tools/system_webview_shell/test/data/blink-apis/eme/eme.html
|
| diff --git a/android_webview/tools/system_webview_shell/test/data/blink-apis/eme/eme.html b/android_webview/tools/system_webview_shell/test/data/blink-apis/eme/eme.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7bfeb2a8f9f5192d0d255b9f4f918269f7bf0b82
|
| --- /dev/null
|
| +++ b/android_webview/tools/system_webview_shell/test/data/blink-apis/eme/eme.html
|
| @@ -0,0 +1,44 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <script src="../../resources/js-test.js"></script>
|
| + <body>
|
| + <script type="text/javascript">
|
| + description("Test EME callbacks in WebView");
|
| + window.jsTestIsAsync = true;
|
| +
|
| + // TODO(yolandyan) Look into whether more key system need to be added
|
| + var chromeKeySystem = "com.widevine.alpha"
|
| +
|
| + var tryKeySystem = function(keySystem) {
|
| + debug("keySystem is " + keySystem);
|
| + navigator.requestMediaKeySystemAccess(
|
| + keySystem,
|
| + [
|
| + { distinctiveIdentifier: "required",
|
| + persistentState: "required",
|
| + label: "'distinctiveIdentifier' and 'persistentState' required"
|
| + },
|
| + { distinctiveIdentifier: "required",
|
| + label: "'distinctiveIdentifier' required"
|
| + },
|
| + { persistentState: "required",
|
| + label: "'persistentState' required"
|
| + },
|
| + { label: "empty" }
|
| + ]
|
| + ).then(
|
| + function (mediaKeySystemAccess) {
|
| + debug("EME success");
|
| + finishJSTest();
|
| + },
|
| + function (error) {
|
| + debug("onError: code" + error.code + ", message=" + error.message);
|
| + finishJSTest();
|
| + }
|
| + );
|
| + };
|
| +
|
| + tryKeySystem(chromeKeySystem);
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|