| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Verify that autoplaying HTMLMediaElement with sound from a cross origin i
frame is blocked by crossOriginMediaPlaybackRequiresUserGesture</title> |
| 3 <script src='../resources/testharness.js'></script> |
| 4 <script src='../resources/testharnessreport.js'></script> |
| 5 <body></body> |
| 6 <script> |
| 7 async_test(t => { |
| 8 window.addEventListener('message', t.step_func(e => { |
| 9 if (e.data.videoId != 'video-muted') |
| 10 return; |
| 11 assert_equals('play', e.data.msg); |
| 12 t.done(); |
| 13 })); |
| 14 }, "test that muted video in cross-origin iframe should autoplay"); |
| 15 |
| 16 async_test(t => { |
| 17 window.addEventListener('message', t.step_func(e => { |
| 18 if (e.data.videoId != 'video') |
| 19 return; |
| 20 assert_equals('canplay', e.data.msg); |
| 21 assert_true(e.data.isPaused); |
| 22 assert_greater_than_equal(e.data.readyState, HTMLMediaElement.HAVE_ENOUGH_DA
TA); |
| 23 t.done(); |
| 24 })); |
| 25 }, "test that muted video in cross-origin iframe should autoplay"); |
| 26 |
| 27 var f = document.createElement('iframe'); |
| 28 f.src = 'http://localhost:8000/media/resources/autoplay-crossorigin-iframe.html'
; |
| 29 f.width=10000; |
| 30 f.height=10000; |
| 31 document.body.appendChild(f); |
| 32 </script> |
| OLD | NEW |