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

Unified Diff: third_party/WebKit/LayoutTests/media/video-seek-no-src.html

Issue 2091973003: Convert video-seek* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/media/video-seek-no-src.html
diff --git a/third_party/WebKit/LayoutTests/media/video-seek-no-src.html b/third_party/WebKit/LayoutTests/media/video-seek-no-src.html
index e6662f1851ef8aeef8d33dd5ee206ae302347ef8..c944bd17417315f2600cfbbff4dfc674f248bb1b 100644
--- a/third_party/WebKit/LayoutTests/media/video-seek-no-src.html
+++ b/third_party/WebKit/LayoutTests/media/video-seek-no-src.html
@@ -1,20 +1,14 @@
-<html>
-<body>
-
- <video loop controls></video>
-
- <p>Test that seeking video with no 'src' attribute sets default playback start position to that time.</p>
-
- <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
- (Please avoid writing new tests using video-test.js) -->
- <script src=video-test.js></script>
- <script>
- testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY);
- testExpected("video.readyState", HTMLMediaElement.HAVE_NOTHING);
- video.currentTime = 1.1;
- testExpected("video.currentTime", 1.1);
- endTest();
- </script>
-
-</body>
-</html>
+<!DOCTYPE HTML>
+<title>Test that seeking video with no "src" attribute, sets default playback start position to that time.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<video></video>
+<script>
+test(function() {
+ var video = document.querySelector("video");
+ assert_equals(video.networkState, HTMLMediaElement.NETWORK_EMPTY);
+ assert_equals(video.readyState, HTMLMediaElement.HAVE_NOTHING);
+ video.currentTime = 1.1;
+ assert_equals(video.currentTime, 1.1);
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698