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

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

Issue 2117513003: 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-media.html
diff --git a/third_party/WebKit/LayoutTests/media/video-source-media.html b/third_party/WebKit/LayoutTests/media/video-source-media.html
index 819bde6f57c2318b33c89d159aec18f6e5827ead..6614ba5d72ab34490d6143689b464d34729a4488 100644
--- a/third_party/WebKit/LayoutTests/media/video-source-media.html
+++ b/third_party/WebKit/LayoutTests/media/video-source-media.html
@@ -1,16 +1,18 @@
-<body>
-<!-- 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("relativeURL(video.currentSrc)", "content/test.mp4");
- endTest();
- } );
-</script>
-<video controls>
- <!-- the media attribute should be ignored -->
- <source src=content/test.mp4 media="print">
- <source src=content/error.mpeg>
+<!DOCTYPE html>
+<title>Test that "media" attribute is ignored in "source" element.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<video>
+ <source src="content/test.mp4" media="print"></source>
+ <source src="content/error.mpeg"></source>
</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), "content/test.mp4");
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698