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

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: Created 4 years, 8 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/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..395611f23842becc219198712805295681fecb9a 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,16 @@
<!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="../media-file.js"></script>
mlamouri (slow - plz ping) 2016/05/05 13:20:22 I don't think you need this <script>
Srirama 2016/05/05 13:41:51 Done. Sorry too much of copy paste here and there.
+<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>

Powered by Google App Engine
This is Rietveld 408576698