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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-unique-origin.html

Issue 2470363004: EME: Fix promise_test() to actually return a promise. (Closed)
Patch Set: remove expected.txt file Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-unique-origin-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Unique origin is unable to create MediaKeys</title> 4 <title>Unique origin is unable to create MediaKeys</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <script> 9 <script>
10 // When the sandbox attribute is present on an iframe, it will 10 // When the sandbox attribute is present on an iframe, it will
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ' return access.createMediaKeys();' + 44 ' return access.createMediaKeys();' +
45 ' }).then(function(mediaKeys) {' + 45 ' }).then(function(mediaKeys) {' +
46 ' window.parent.postMessage({result: \'allowed\'} , \'*\');' + 46 ' window.parent.postMessage({result: \'allowed\'} , \'*\');' +
47 ' }, function(error) {' + 47 ' }, function(error) {' +
48 ' window.parent.postMessage({result: \'failed\'}, \'*\');' + 48 ' window.parent.postMessage({result: \'failed\'}, \'*\');' +
49 ' });' + 49 ' });' +
50 ' };' + 50 ' };' +
51 '<\/script>'; 51 '<\/script>';
52 52
53 // Verify that this page can create a MediaKeys first. 53 // Verify that this page can create a MediaKeys first.
54 navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{ 54 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{
55 initDataTypes: [ 'keyids' ], 55 initDataTypes: [ 'keyids' ],
56 audioCapabilities: [ 56 audioCapabilities: [
57 { contentType: 'audio/mp4; codecs="mp4a.40.2"' }, 57 { contentType: 'audio/mp4; codecs="mp4a.40.2"' },
58 { contentType: 'audio/webm; codecs="opus"' } 58 { contentType: 'audio/webm; codecs="opus"' }
59 ] 59 ]
60 }]).then(function(access) { 60 }]).then(function(access) {
61 return access.createMediaKeys(); 61 return access.createMediaKeys();
62 }).then(function(mediaKeys) { 62 }).then(function(mediaKeys) {
63 // Success, so now create the iframe and try there. 63 // Success, so now create the iframe and try there.
64 return load_iframe(script, 'allow-scripts') 64 return load_iframe(script, 'allow-scripts');
65 }).then(function(iframe) { 65 }).then(function(iframe) {
66 iframe.contentWindow.postMessage({}, '*'); 66 iframe.contentWindow.postMessage({}, '*');
67 return wait_for_message(); 67 return wait_for_message();
68 }).then(function(message) { 68 }).then(function(message) {
69 assert_equals(message.result, 'failed'); 69 assert_equals(message.result, 'failed');
70 }); 70 });
71 }, 'Unique origin is unable to create MediaKeys'); 71 }, 'Unique origin is unable to create MediaKeys');
72 </script> 72 </script>
73 </body> 73 </body>
74 </html> 74 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-unique-origin-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698