summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/encrypted-media/Google/chromium_specific_disabled/encrypted-media-async-setcert-with-gc.html
blob: 4da562894d6cf468d9712f9278f5ae03f317f8ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<!-- Copyright © 2016 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). -->
<html>
    <head>
        <title>Test asynchronous setServerCertificate while running garbage collection</title>
        <script src="encrypted-media-utils.js"></script>
<!--
        Test requires Chromium specific content and is being disabled.
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
-->
    </head>
    <body>
        <div id="log"></div>
        <script>
            // Run garbage collection continuously.
            setInterval(asyncGC, 0);

            promise_test(function(test)
            {
                return navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimpleConfiguration()).then(function(access) {
                    return access.createMediaKeys();
                }).then(function(mediaKeys) {
                    var cert = new Uint8Array(200);
                    return mediaKeys.setServerCertificate(cert);
                }).then(function(result) {
                    assert_false(result);
                });
            }, 'Test asynchronous setServerCertificate while running garbage collection.');
        </script>
    </body>
</html>