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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-black-bg-in-media-document.html

Issue 2060353005: Convert video-autoplay*, video-black* and video-buffered* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nit Created 4 years, 6 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 <html> 1 <!DOCTYPE html>
2 <head> 2 <title>Test that video media documents have a black background.</title>
3 <script src="media-file.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 4 <script src="../resources/testharnessreport.js"></script>
5 (Please avoid writing new tests using video-test.js) --> 5 <script src="media-file.js"></script>
6 <script src="video-test.js"></script> 6 <iframe></iframe>
7 <script> 7 <script>
8 function iframeLoad() { 8 async_test(function(t) {
9 var iframe = document.querySelector("iframe"); 9 var iframe = document.querySelector("iframe");
10 var iframeBody = iframe.contentDocument.querySelector("body"); 10 iframe.onload = t.step_func_done(function() {
11 var iframeDocument = iframe.contentDocument;
12 var iframeBody = iframeDocument.querySelector("body");
11 13
12 // Required to be global for testExpected() to work properly. 14 var iframeBodyStyle = iframeDocument.defaultView.getComputedStyle(iframe Body);
13 iframeBodyStyle = iframe.contentDocument.defaultView.getComputed Style(iframeBody, null); 15 assert_equals(iframeBodyStyle.backgroundColor, "rgb(0, 0, 0)");
14 testExpected("iframeBodyStyle.backgroundColor", "rgb(0, 0, 0)"); 16 });
15 endTest();
16 }
17 17
18 function load() { 18 iframe.src = findMediaFile("video", "content/counting");
19 var iframe = document.querySelector("iframe"); 19 });
20 iframe.onload = iframeLoad; 20 </script>
21 iframe.src = findMediaFile("video", "content/counting");
22 }
23 </script>
24 </head>
25
26 <body onload="load()">
27 <p>Test that video media documents have a black background.</p>
28 <iframe style="width: 200px; height: 200px;"></iframe>
29 </body>
30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698