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

Unified Diff: third_party/WebKit/LayoutTests/media/media-extension-with-fragment.html

Issue 2043473002: Convert media-ended*, media-extension* and media-load* 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/media-extension-with-fragment.html
diff --git a/third_party/WebKit/LayoutTests/media/media-extension-with-fragment.html b/third_party/WebKit/LayoutTests/media/media-extension-with-fragment.html
index 361baf5306beb529c51eeff397b389d6d1d9674a..04df5d913fe67427204bdeb6c07ac2540606c85f 100644
--- a/third_party/WebKit/LayoutTests/media/media-extension-with-fragment.html
+++ b/third_party/WebKit/LayoutTests/media/media-extension-with-fragment.html
@@ -1,32 +1,14 @@
<!DOCTYPE html>
-<html>
- <head>
- <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>
- function finish()
- {
- logResult(event.type == "loadeddata", "MediaPlayer extracted extension from src url.");
- consoleWrite("");
- endTest();
- }
-
-
- function start()
- {
- findMediaElement();
- waitForEventAndEnd('loadeddata', finish);
- waitForEvent('error', finish);
- video.src = findMediaFile("video", "content/test") + "#01.00.xyz";
- }
- </script>
-
- </head>
- <body onload="start()">
-
- <video controls ></video>
-
- </body>
-</html>
+<title>Test that a media url with fragment loads properly</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<video></video>
+<script>
+async_test(function(t) {
+ var video = document.querySelector("video");
+ video.onloadeddata = t.step_func_done();
+ video.onerror = t.unreached_func();
+ video.src = findMediaFile("video", "content/test") + "#01.00.xyz";
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698