OLD | NEW |
| 1 <!DOCTYPE html> |
| 2 <title>Test that play event fires when "src" set with an autoplay attribute in a
sandbox with allows-scripts.</title> |
| 3 <script src="../resources/testharness.js"></script> |
| 4 <script src="../resources/testharnessreport.js"></script> |
| 5 <script src="media-file.js"></script> |
| 6 <iframe |
| 7 sandbox="allow-scripts allow-same-origin" |
| 8 src="resources/auto-play-in-sandbox-with-allow-scripts-iframe.html"> |
| 9 </iframe> |
1 <script> | 10 <script> |
2 if (window.testRunner) { | 11 async_test(function(t) { |
3 testRunner.dumpAsText(); | 12 var iframe = document.querySelector("iframe"); |
4 testRunner.dumpChildFramesAsText(); | 13 |
5 } | 14 iframe.onload = t.step_func(function() { |
6 </script> | 15 var video = iframe.contentDocument.querySelector("video"); |
7 <iframe | 16 assert_true(video.paused); |
8 style="width: 400px; height: 600px" | 17 video.onplay = t.step_func_done(); |
9 sandbox="allow-scripts allow-same-origin" | 18 video.src = findMediaFile("video", "content/test"); |
10 src="resources/auto-play-in-sandbox-with-allow-scripts-iframe.html"></iframe
> | 19 }); |
| 20 }); |
| 21 </script> |
OLD | NEW |