| Index: third_party/WebKit/LayoutTests/media/video-controls-in-media-document.html
 | 
| diff --git a/third_party/WebKit/LayoutTests/media/video-controls-in-media-document.html b/third_party/WebKit/LayoutTests/media/video-controls-in-media-document.html
 | 
| index 498e9b2b5e827254a883a0f4c72853abe0c53973..05b878d8dc7dbd5c329c69c3c53a556453b2b86a 100644
 | 
| --- a/third_party/WebKit/LayoutTests/media/video-controls-in-media-document.html
 | 
| +++ b/third_party/WebKit/LayoutTests/media/video-controls-in-media-document.html
 | 
| @@ -1,28 +1,22 @@
 | 
| -<p>Test that controls don't increase the size of the container (i.e. are
 | 
| -rendered overlapping with the video canvas).<p>
 | 
| -<script src="media-file.js" type="text/javascript"></script>
 | 
| -<!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
 | 
| -     (Please avoid writing new tests using video-test.js) -->
 | 
| -<script src="video-test.js" type="text/javascript"></script>
 | 
| +<!DOCTYPE html>
 | 
| +<title>Test that controls don't increase the size of the container (i.e. are rendered overlapping with the video canvas).</title>
 | 
| +<script src="../resources/testharness.js"></script>
 | 
| +<script src="../resources/testharnessreport.js"></script>
 | 
| +<script src="media-file.js"></script>
 | 
| +<iframe style="width: 400px; height: 300px; border: 0px;"></iframe>
 | 
| +<script>
 | 
| +async_test(function(t) {
 | 
| +    var iframe = document.querySelector("iframe");
 | 
|  
 | 
| -<iframe style="width: 400px; height: 300px; border: 0px;" id="container"> </iframe>
 | 
| +    iframe.onload = t.step_func(function() {
 | 
| +        var video = iframe.contentDocument.querySelector("video");
 | 
|  
 | 
| -<script type="text/javascript">
 | 
| -var iframe = document.getElementById("container");
 | 
| +        video.ontimeupdate = t.step_func_done(function() {
 | 
| +            var controls = internals.shadowRoot(video).firstChild.firstChild;
 | 
| +            assert_less_than_equal(controls.offsetTop + controls.offsetHeight, video.offsetHeight);
 | 
| +        });
 | 
| +    });
 | 
|  
 | 
| -function timeupdate(event) {
 | 
| -    var video = event.target;
 | 
| -    controls = internals.shadowRoot(video).firstChild.firstChild;
 | 
| -    testExpected("controls.offsetTop + controls.offsetHeight", video.offsetHeight, "<=");
 | 
| -    testRunner.notifyDone();
 | 
| -};
 | 
| -
 | 
| -function start() {
 | 
| -    var iframeDocument = document.getElementById("container").contentDocument;
 | 
| -    var video = iframeDocument.querySelector("video");
 | 
| -    video.addEventListener("timeupdate", timeupdate);
 | 
| -};
 | 
| -
 | 
| -iframe.onload = start;
 | 
| -iframe.src = findMediaFile("video", "content/test");
 | 
| -</script>
 | 
| +    iframe.src = findMediaFile("video", "content/test");
 | 
| +});
 | 
| +</script>
 | 
| 
 |