| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src=media-file.js></script> | 4 <script src=media-file.js></script> |
| 5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 6 (Please avoid writing new tests using video-test.js) --> |
| 5 <script src=video-test.js></script> | 7 <script src=video-test.js></script> |
| 6 | 8 |
| 7 <script> | 9 <script> |
| 8 | 10 |
| 9 function errorEvent() | 11 function errorEvent() |
| 10 { | 12 { |
| 11 logResult(false, "*** \"" + relativeURL(video.currentSrc) + "\"
should not have been processed!" ); | 13 logResult(false, "*** \"" + relativeURL(video.currentSrc) + "\"
should not have been processed!" ); |
| 12 consoleWrite(""); | 14 consoleWrite(""); |
| 13 endTest(); | 15 endTest(); |
| 14 } | 16 } |
| 15 | 17 |
| 16 function setup() | 18 function setup() |
| 17 { | 19 { |
| 18 video = document.createElement("video"); | 20 video = document.createElement("video"); |
| 19 video.setAttribute("controls", "controls"); | 21 video.setAttribute("controls", "controls"); |
| 20 | 22 |
| 21 // The first source should load. | 23 // The first source should load. |
| 22 var source = document.createElement("source"); | 24 var source = document.createElement("source"); |
| 23 source.setAttribute("src", findMediaFile("video", "content/test"
)); | 25 source.setAttribute("src", findMediaFile("video", "content/test"
)); |
| 24 source.setAttribute("type", mimeTypeForFile(source.getAttribute(
"src"))); | 26 source.setAttribute("type", mimeTypeForFile(source.getAttribute(
"src"))); |
| 25 video.appendChild(source); | 27 video.appendChild(source); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 38 } | 40 } |
| 39 | 41 |
| 40 </script> | 42 </script> |
| 41 </head> | 43 </head> |
| 42 <body onload="setup()"> | 44 <body onload="setup()"> |
| 43 | 45 |
| 44 <p>Test that a single valid <source> element loads correctly</p> | 46 <p>Test that a single valid <source> element loads correctly</p> |
| 45 | 47 |
| 46 </body> | 48 </body> |
| 47 </html> | 49 </html> |
| OLD | NEW |