Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / encrypted-media / encrypted-media-onencrypted.html
blobf0bf60a138079383b594f9f2ae49c61642fdc785
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>onencrypted</title>
5 <script src="encrypted-media-utils.js"></script>
6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script>
8 </head>
9 <body>
10 <video id="testVideo" controls></video>
11 <div id="log"></div>
12 <script>
13 var expectedInitData = stringToUint8Array('0123456789012345');
15 // Will get 2 identical events, one for audio, one for video.
16 var expectedEvents = 2;
18 async_test(function(test)
20 var video = document.getElementById('testVideo');
22 var onEncrypted = function(event)
24 assert_equals(event.target, video);
25 assert_true(event instanceof window.MediaEncryptedEvent);
26 assert_equals(event.type, 'encrypted');
27 assert_equals(event.initDataType, 'webm');
28 assert_array_equals(new Uint8Array(event.initData), expectedInitData);
30 if (--expectedEvents == 0)
31 test.done();
34 waitForEventAndRunStep('encrypted', video, onEncrypted, test);
35 video.src = '../content/test-encrypted.webm';
36 }, 'encrypted fired on encrypted media file.');
37 </script>
38 </body>
39 </html>