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

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

Issue 2028463002: Convert media-can-* 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
Index: third_party/WebKit/LayoutTests/media/media-can-play-mpeg-audio.html
diff --git a/third_party/WebKit/LayoutTests/media/media-can-play-mpeg-audio.html b/third_party/WebKit/LayoutTests/media/media-can-play-mpeg-audio.html
index ed53e6285de4670d59cee7f291476f6bbda73be4..cd27f0008cdd9005804b6d79f5ee1c4cf01d0fdf 100644
--- a/third_party/WebKit/LayoutTests/media/media-can-play-mpeg-audio.html
+++ b/third_party/WebKit/LayoutTests/media/media-can-play-mpeg-audio.html
@@ -1,29 +1,18 @@
<!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];
+<title>Test HTMLMediaElement's "canPlayType" method with multiple audio mpeg 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");
+ // Currently no platform supports the below formats.
+ assert_equals(audio.canPlayType("audio/x-mpeg"), "");
+ assert_equals(audio.canPlayType("audio/x-mp3"), "");
+ assert_equals(audio.canPlayType("audio/mp3"), "");
+ assert_equals(audio.canPlayType("audio/mpeg"), "");
- testExpected("audio.canPlayType('audio/x-mpeg')", "maybe");
- testExpected("audio.canPlayType('audio/x-mp3')", "maybe");
- testExpected("audio.canPlayType('audio/mp3')", "maybe");
- testExpected("audio.canPlayType('audio/mpeg')", "maybe");
-
- testExpected("audio.canPlayType('audio/mp4')", "maybe");
- testExpected("audio.canPlayType('audio/aac')", "maybe");
-
- endTest();
- }
- </script>
- </head>
- <body onload="start()">
- <audio controls></audio>
- <p>Test HTMLMediaElement <em>canPlayType()</em> method with multiple audio mpeg MIME types.</p>
- <p>These tests may be expected to fail if the WebKit port does not support the format.</p>
- </body>
-</html>
+ assert_equals(audio.canPlayType("audio/mp4"), "");
+ assert_equals(audio.canPlayType("audio/aac"), "");
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698