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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html

Issue 2652373002: EME: Fail requestMediaKeySystemAccess if no capabilities specified (Closed)
Patch Set: more changes Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Initialization Data not returned when using different origin</tit le> 4 <title>Initialization Data not returned when using different origin</tit le>
5 <script src="/js-test-resources/testharness.js"></script> 5 <script src="/js-test-resources/testharness.js"></script>
6 <script src="/js-test-resources/testharnessreport.js"></script> 6 <script src="/js-test-resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <video id="testVideo"></video> 9 <video id="testVideo"></video>
10 <div id="log"></div> 10 <div id="log"></div>
(...skipping 26 matching lines...) Expand all
37 37
38 // Both the audio and the video tracks have initData, 38 // Both the audio and the video tracks have initData,
39 // so finish once both events are received. 39 // so finish once both events are received.
40 if (++encryptedEventCount == 2) { 40 if (++encryptedEventCount == 2) {
41 logMessage('done'); 41 logMessage('done');
42 test.done(); 42 test.done();
43 } 43 }
44 } 44 }
45 45
46 logMessage('starting'); 46 logMessage('starting');
47 navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]).t hen(function(access) { 47 navigator.requestMediaKeySystemAccess(
48 'org.w3.clearkey',
49 [{audioCapabilities: [{contentType: 'audio/webm; codecs=vorb is'}]}])
50 .then(function(access) {
48 return access.createMediaKeys(); 51 return access.createMediaKeys();
49 }).then(function(mediaKeys) { 52 }).then(function(mediaKeys) {
50 video.addEventListener('encrypted', test.step_func(onEncrypt ed), true); 53 video.addEventListener('encrypted', test.step_func(onEncrypt ed), true);
51 return video.setMediaKeys(mediaKeys); 54 return video.setMediaKeys(mediaKeys);
52 }).then(function(result) { 55 }).then(function(result) {
53 // Verify that the current origin is different than what 56 // Verify that the current origin is different than what
54 // we use for the content. 57 // we use for the content.
55 logMessage('setting src'); 58 logMessage('setting src');
56 assert_equals(document.origin, 'http://127.0.0.1:8000'); 59 assert_equals(document.origin, 'http://127.0.0.1:8000');
57 video.src = 'http://127.0.0.1:8080/media/encrypted-media/tes t-encrypted.webm'; 60 video.src = 'http://127.0.0.1:8080/media/encrypted-media/tes t-encrypted.webm';
58 video.play(); 61 video.play();
59 }); 62 });
60 }, 'Initialization Data not returned when using different origin.'); 63 }, 'Initialization Data not returned when using different origin.');
61 </script> 64 </script>
62 </body> 65 </body>
63 </html> 66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698