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

Side by Side Diff: third_party/WebKit/LayoutTests/media/media-can-play-octet-stream.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, 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Test HTMLMediaElement's "canPlayType" method with "application/octet-stre am".</title>
3 <head> 3 <script src="../resources/testharness.js"></script>
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 4 <script src="../resources/testharnessreport.js"></script>
5 (Please avoid writing new tests using video-test.js) --> 5 <script>
6 <script src="video-test.js"></script> 6 function check_media_element_canplaytype(elementName) {
7 <script> 7 test(function() {
8 function test() 8 » var mediaElement = document.createElement(elementName);
9 { 9 // These tests should always pass as no platform
10 testExpected("mediaElement.canPlayType('APPLICATION/octet-stream ')", ""); 10 // should support "application/octet-stream".
11 testExpected("mediaElement.canPlayType('application/octet-stream ;codecs=theora')", ""); 11 assert_equals(mediaElement.canPlayType("APPLICATION/octet-stream"), "");
12 testExpected("mediaElement.canPlayType('application/octet-stream ;codecs=mp4')", ""); 12 assert_equals(mediaElement.canPlayType("application/octet-stream;codecs= theora"), "");
13 } 13 assert_equals(mediaElement.canPlayType("application/octet-stream;codecs= mp4"), "");
14 }, "check \"canPlayType\" method for " + elementName);
15 }
14 16
15 function start() 17 check_media_element_canplaytype("audio");
16 { 18 check_media_element_canplaytype("video");
17 consoleWrite("<em>++ Test with &lt;video&gt; element.</em>"); 19 </script>
18 mediaElement = document.getElementsByTagName('video')[0];
19 test();
20
21 consoleWrite("<br><em>++ Test with &lt;audio&gt; element.</em>") ;
22 mediaElement = new Audio();
23 test();
24
25 endTest();
26 }
27 </script>
28 </head>
29 <body onload="start()">
30 <video controls></video>
31 <p>Test HTMLMediaElement <em>canPlayType()</em> method with "application /octet-stream".</p>
32 <p>These tests should always pass as no WebKit port should support "appl ication/octet-stream".</p>
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698