Chromium Code Reviews

Side by Side Diff: third_party/WebKit/LayoutTests/media/auto-play-in-sandbox-with-allow-scripts.html

Issue 2146923002: Convert auto-play-in-sandbox* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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>
OLDNEW

Powered by Google App Engine