OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>load() and the <source> element</title> | 4 <title>load() and the <source> element</title> |
| 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 <script src=media-file.js></script> | 8 <script src=media-file.js></script> |
7 <script> | 9 <script> |
8 var sources = []; | 10 var sources = []; |
9 var count = 0; | 11 var count = 0; |
10 | 12 |
11 function canplaythrough() | 13 function canplaythrough() |
12 { | 14 { |
13 testExpected("stripExtension(relativeURL(video.currentSrc))", re
lativeURL(stripExtension(sources[1]))); | 15 testExpected("stripExtension(relativeURL(video.currentSrc))", re
lativeURL(stripExtension(sources[1]))); |
14 ++count; | 16 ++count; |
15 switch (count) | 17 switch (count) |
16 { | 18 { |
17 case 1: | 19 case 1: |
18 consoleWrite("<br>+++ Calling load()."); | 20 consoleWrite("<br>+++ Calling load()."); |
19 video.load(); | 21 video.load(); |
20 break; | 22 break; |
21 case 2: | 23 case 2: |
22 endTest(); | 24 endTest(); |
23 return; | 25 return; |
24 } | 26 } |
25 } | 27 } |
(...skipping 26 matching lines...) Expand all Loading... |
52 waitForEvent("canplaythrough", canplaythrough); | 54 waitForEvent("canplaythrough", canplaythrough); |
53 waitForEvent("error"); | 55 waitForEvent("error"); |
54 } | 56 } |
55 </script> | 57 </script> |
56 </head> | 58 </head> |
57 <body onload="setup()"> | 59 <body onload="setup()"> |
58 <video controls width=300 ></video> | 60 <video controls width=300 ></video> |
59 <p>Test that the resource selection algorithm is restarted when load() i
s called, and that all <source> elements are reconsidered.</p> | 61 <p>Test that the resource selection algorithm is restarted when load() i
s called, and that all <source> elements are reconsidered.</p> |
60 </body> | 62 </body> |
61 </html> | 63 </html> |
OLD | NEW |