| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Add <source> after removing failed candidate</title> | 4 <title>Add <source> after removing failed candidate</title> |
| 5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 5 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
| 6 (Please avoid writing new tests using video-test.js) --> | 6 (Please avoid writing new tests using video-test.js) --> |
| 7 <script src=video-test.js></script> | 7 <script src=video-test.js></script> |
| 8 <script src=media-file.js></script> | 8 <script src=media-file.js></script> |
| 9 <script> | 9 <script> |
| 10 function error() | 10 function error() |
| 11 { | 11 { |
| 12 findMediaElement(); | 12 findMediaElement(); |
| 13 video.removeChild(video.firstChild); | 13 video.removeChild(video.firstChild); |
| 14 var source = document.createElement("source"); | 14 var source = document.createElement("source"); |
| 15 source.src = findMediaFile("video", "content/test"); | 15 source.src = findMediaFile("video", "content/test"); |
| 16 video.appendChild(source); | 16 video.appendChild(source); |
| 17 waitForEventAndEnd("loadedmetadata"); | 17 waitForEventAndEnd("loadedmetadata"); |
| 18 } | 18 } |
| 19 </script> | 19 </script> |
| 20 </head> | 20 </head> |
| 21 | 21 |
| 22 <body> | 22 <body> |
| 23 <video><source onerror="error()"></video> | 23 <video><source onerror="error()"></video> |
| 24 </body> | 24 </body> |
| 25 </html> | 25 </html> |
| OLD | NEW |