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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/video-buffered-range-contains-currentTime.html

Issue 2196673002: Convert video-buffer* http tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/media/video-buffered-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/media/video-buffered-range-contains-currentTime.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/video-buffered-range-contains-currentTime.html b/third_party/WebKit/LayoutTests/http/tests/media/video-buffered-range-contains-currentTime.html
index ff27dedd699d415a2c51f60fe4c977ead5e4d54d..cefe7535149af46e95cb1c3d8d453517cbaf5efb 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/video-buffered-range-contains-currentTime.html
+++ b/third_party/WebKit/LayoutTests/http/tests/media/video-buffered-range-contains-currentTime.html
@@ -1,33 +1,24 @@
-<html>
- <head>
- <script src=../../media-resources/media-file.js></script>
- <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
- (Please avoid writing new tests using video-test.js) -->
- <script src=../../media-resources/video-test.js></script>
- <script>
- if (window.testRunner)
- testRunner.dumpAsTextWithPixelResults(); // To get pixels.
+<!DOCTYPE html>
+<title>Test that the painted buffered range contains currentTime.</title>
+<script src="../../media-resources/media-file.js"></script>
+<video controls></video>
+<script>
+var video = document.querySelector("video");
- function start() {
- findMediaElement();
+testRunner.waitUntilDone();
+video.onended = function() {
+ testRunner.notifyDone();
+};
- waitForEventAndEnd('ended');
- waitForEvent('seeked', function() {
- video.play();
- });
- waitForEvent('loadedmetadata', function() {
- video.currentTime = video.duration - 0.5;
- } );
+video.onseeked = function() {
+ video.play();
+};
- var mediaFile = findMediaFile("audio", "../../../media/content/test");
- var type = mimeTypeForExtension(mediaFile.split('.').pop());
- video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + mediaFile + "&throttle=50&nph=1&type=" + type;
- video.load();
- }
- </script>
- </head>
- <body onload="start()">
- <video controls></video>
- <p>Test that the painted buffered range contains currentTime.</p>
- </body>
-</html>
+video.onloadedmetadata = function() {
+ video.currentTime = video.duration - 0.5;
+};
+
+var mediaFile = findMediaFile("audio", "../../../media/content/test");
+var type = mimeTypeForExtension(mediaFile.split(".").pop());
+video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + mediaFile + "&throttle=5000&nph=1&type=" + type;
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/media/video-buffered-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698