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

Unified Diff: third_party/WebKit/LayoutTests/media/video-source-type-params.html

Issue 2102433003: Convert video-source* 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-source-type-params.html
diff --git a/third_party/WebKit/LayoutTests/media/video-source-type-params.html b/third_party/WebKit/LayoutTests/media/video-source-type-params.html
index fede3edb99e5da21568baae1afd45b7c14915c70..02c5b7d4207bfea8f75512e2cdda5a7ed431bc38 100644
--- a/third_party/WebKit/LayoutTests/media/video-source-type-params.html
+++ b/third_party/WebKit/LayoutTests/media/video-source-type-params.html
@@ -1,18 +1,21 @@
-<body>
-<script src=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=video-test.js></script>
-<script>
- waitForEvent('loadstart', function () {
- video = mediaElement = document.getElementsByTagName('video')[0];
- testExpected("stripExtension(relativeURL(video.currentSrc))", stripExtension(findMediaFile("video", "content/test")));
- endTest();
- } );
-</script>
-<video controls>
+<!DOCTYPE html>
+<title>Test "source" element "type" attribute with "params".</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<video>
<source src=content/bogus.mpeg type="video/blahblah">
<source src=content/test.mp4 type="video/mpeg; codecs=&quot;avc1.4D400C&quot;">
<source src=content/test.ogv type="video/ogg; codecs=&quot;theora,vorbis&quot;">
<source src=content/error2.mpeg type=video/mpeg>
</video>
+<script>
+async_test(function(t) {
+ var video = document.querySelector("video");
+
+ video.onloadstart = t.step_func_done(function() {
+ var url = video.currentSrc;
+ assert_equals(url.substr(url.lastIndexOf("/media/") + 7), findMediaFile("video", "content/test"));
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698