OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
3 | 3 |
4 <video controls></video> | 4 <video controls></video> |
5 | 5 |
6 <p>Test that setting src to an invalid url triggers load(), which sets netwo
rkState | 6 <p>Test that setting src to an invalid url triggers load(), which sets netwo
rkState |
7 to NETWORK_NO_SOURCE. Setting src to a valid url should then trigger the loa
ding | 7 to NETWORK_NO_SOURCE. Setting src to a valid url should then trigger the loa
ding |
8 events and end up with networkState >= NETWORK_LOADING. | 8 events and end up with networkState >= NETWORK_LOADING. |
9 </p> | 9 </p> |
10 | 10 |
11 <script src=media-file.js></script> | 11 <script src=media-file.js></script> |
12 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 12 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
13 (Please avoid writing new tests using video-test.js) --> | 13 (Please avoid writing new tests using video-test.js) --> |
14 <script src=video-test.js></script> | 14 <script src=video-test.js></script> |
15 <script> | 15 <script> |
16 function testNetworkState(expected, endit, op) | 16 function testNetworkState(expected, endit, op) |
17 { | 17 { |
18 testExpected("video.networkState", expected, op); | 18 testExpected("video.networkState", expected, op); |
19 if (endit) | 19 if (endit) |
20 endTest(); | 20 endTest(); |
21 } | 21 } |
22 | 22 |
(...skipping 25 matching lines...) Expand all Loading... |
48 // first set the src to a bogus url, it should attempt a load | 48 // first set the src to a bogus url, it should attempt a load |
49 consoleWrite(""); | 49 consoleWrite(""); |
50 testNetworkState(HTMLMediaElement.NETWORK_EMPTY); | 50 testNetworkState(HTMLMediaElement.NETWORK_EMPTY); |
51 run("video.src = 'bogus/movie.mpg'"); | 51 run("video.src = 'bogus/movie.mpg'"); |
52 | 52 |
53 setTimeout(waitUntilNotLoading, 100); | 53 setTimeout(waitUntilNotLoading, 100); |
54 </script> | 54 </script> |
55 | 55 |
56 </body> | 56 </body> |
57 </html> | 57 </html> |
OLD | NEW |