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

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

Issue 2270383002: clean up encrypted-media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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>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 <div id="log"></div>
10 <script> 9 <script>
11 // When the sandbox attribute is present on an iframe, it will 10 // When the sandbox attribute is present on an iframe, it will
12 // treat the content as being from a unique origin. So try to 11 // treat the content as being from a unique origin. So try to
13 // call createMediaKeys() inside an iframe and it should fail. 12 // call createMediaKeys() inside an iframe and it should fail.
14 13
15 function load_iframe(src, sandbox) { 14 function load_iframe(src, sandbox) {
16 return new Promise(function(resolve) { 15 return new Promise(function(resolve) {
17 var iframe = document.createElement('iframe'); 16 var iframe = document.createElement('iframe');
18 iframe.onload = function() { resolve(iframe); }; 17 iframe.onload = function() { resolve(iframe); };
19 iframe.sandbox = sandbox; 18 iframe.sandbox = sandbox;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 }).then(function(iframe) { 65 }).then(function(iframe) {
67 iframe.contentWindow.postMessage({}, '*'); 66 iframe.contentWindow.postMessage({}, '*');
68 return wait_for_message(); 67 return wait_for_message();
69 }).then(function(message) { 68 }).then(function(message) {
70 assert_equals(message.result, 'failed'); 69 assert_equals(message.result, 'failed');
71 }); 70 });
72 }, 'Unique origin is unable to create MediaKeys'); 71 }, 'Unique origin is unable to create MediaKeys');
73 </script> 72 </script>
74 </body> 73 </body>
75 </html> 74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698