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

Unified Diff: third_party/WebKit/LayoutTests/media/media-can-play-flac-audio.html

Issue 2028463002: Convert media-can-* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/LayoutTests/media/media-can-play-flac-audio.html
diff --git a/third_party/WebKit/LayoutTests/media/media-can-play-flac-audio.html b/third_party/WebKit/LayoutTests/media/media-can-play-flac-audio.html
index 8f32086b85e672bf0d6297af95d341aa376c077d..c0303be40449f5797ed8635ab8ec8928b7ae763b 100644
--- a/third_party/WebKit/LayoutTests/media/media-can-play-flac-audio.html
+++ b/third_party/WebKit/LayoutTests/media/media-can-play-flac-audio.html
@@ -1,24 +1,13 @@
<!DOCTYPE html>
-<html>
- <head>
- <!-- 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 start()
- {
- audio = document.getElementsByTagName('audio')[0];
-
- testExpected("audio.canPlayType('audio/x-flac')", "maybe");
- testExpected("audio.canPlayType('audio/flac')", "maybe");
-
- endTest();
- }
- </script>
- </head>
- <body onload="start()">
- <audio controls></audio>
- <p>Test HTMLMediaElement <em>canPlayType()</em> method with multiple .flac MIME types.</p>
- <p>These tests may be expected to fail if the WebKit port does not support the format.</p>
- </body>
-</html>
+<title>Test HTMLMediaElement's "canPlayType" method with multiple .flac MIME types.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<audio></audio>
+<script>
+test(function() {
+ var audio = document.querySelector("audio");
+ // These tests may be expected to fail if the platform does not support the format.
+ assert_equals(audio.canPlayType("audio/x-flac"), "maybe");
+ assert_equals(audio.canPlayType("audio/flac"), "maybe");
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698