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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html

Issue 1934913002: Convert track-load* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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 | « no previous file | third_party/WebKit/LayoutTests/media/track/track-load-error-readyState-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html b/third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html
index 74259da853a8dfc47a5bb9688cdad2b66e4f0bcc..6ad78975f6177dc402ca0c099e47239d33f11dec 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html
@@ -1,28 +1,15 @@
<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <script src=../media-file.js></script>
- <!-- TODO(philipj): 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 trackError()
- {
- consoleWrite("EVENT(error)");
- track = document.getElementById('testTrackError');
- testExpected("track.readyState", HTMLTrackElement.ERROR);
- endTest();
- }
-
- </script>
- </head>
- <body>
- <p>Tests the error event on HTMLTrackElement and ERROR readyState on TextTrack.</p>
- <video id="videotests">
- <track id="testTrackError" src="junk" onerror="trackError()" default>
- </video>
- </body>
-</html>
+<title>Tests the error event on HTMLTrackElement and ERROR readyState on TextTrack.</title>
+<video>
+ <track src="junk" default>
+</video>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+async_test(function(t) {
+ var track = document.querySelector("track");
+ track.onerror = t.step_func_done(function() {
+ assert_equals(track.readyState, HTMLTrackElement.ERROR);
+ });
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-load-error-readyState-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698