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

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

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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 <p>Test that controls don't increase the size of the container (i.e. are 1 <p>Test that controls don't increase the size of the container (i.e. are
2 rendered overlapping with the video canvas).<p> 2 rendered overlapping with the video canvas).<p>
3 <script src="media-file.js" type="text/javascript"></script> 3 <script src="media-file.js" type="text/javascript"></script>
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
5 (Please avoid writing new tests using video-test.js) -->
4 <script src="video-test.js" type="text/javascript"></script> 6 <script src="video-test.js" type="text/javascript"></script>
5 7
6 <iframe style="width: 400px; height: 300px; border: 0px;" id="container"> </ifra me> 8 <iframe style="width: 400px; height: 300px; border: 0px;" id="container"> </ifra me>
7 9
8 <script type="text/javascript"> 10 <script type="text/javascript">
9 var iframe = document.getElementById("container"); 11 var iframe = document.getElementById("container");
10 12
11 function timeupdate(event) { 13 function timeupdate(event) {
12 var video = event.target; 14 var video = event.target;
13 controls = internals.shadowRoot(video).firstChild.firstChild; 15 controls = internals.shadowRoot(video).firstChild.firstChild;
14 testExpected("controls.offsetTop + controls.offsetHeight", video.offsetHeigh t, "<="); 16 testExpected("controls.offsetTop + controls.offsetHeight", video.offsetHeigh t, "<=");
15 testRunner.notifyDone(); 17 testRunner.notifyDone();
16 }; 18 };
17 19
18 function start() { 20 function start() {
19 var iframeDocument = document.getElementById("container").contentDocument; 21 var iframeDocument = document.getElementById("container").contentDocument;
20 var video = iframeDocument.querySelector("video"); 22 var video = iframeDocument.querySelector("video");
21 video.addEventListener("timeupdate", timeupdate); 23 video.addEventListener("timeupdate", timeupdate);
22 }; 24 };
23 25
24 iframe.onload = start; 26 iframe.onload = start;
25 iframe.src = findMediaFile("video", "content/test"); 27 iframe.src = findMediaFile("video", "content/test");
26 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698