OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>networkState after inserting <source> test</title> | 4 <title>networkState after inserting <source> test</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 </head> | 8 </head> |
7 <body> | 9 <body> |
8 <video controls><source></video> | 10 <video controls><source></video> |
9 | 11 |
10 <p>Test that a <source> inserted when networkState is NETWORK_NO_S
OURCE triggers | 12 <p>Test that a <source> inserted when networkState is NETWORK_NO_S
OURCE triggers |
11 resource selection, immediately changing networkState to NETWORK_NO_SOUR
CE.</p> | 13 resource selection, immediately changing networkState to NETWORK_NO_SOUR
CE.</p> |
12 | 14 |
13 <script> | 15 <script> |
14 consoleWrite("<source> inserted by the parser."); | 16 consoleWrite("<source> inserted by the parser."); |
15 video = document.querySelector('video'); | 17 video = document.querySelector('video'); |
16 testExpected("video.networkState", HTMLMediaElement.prototype.NETWOR
K_NO_SOURCE, "=="); | 18 testExpected("video.networkState", HTMLMediaElement.prototype.NETWOR
K_NO_SOURCE, "=="); |
17 | 19 |
18 consoleWrite("<br><video> created with script."); | 20 consoleWrite("<br><video> created with script."); |
19 video = document.createElement('video'); | 21 video = document.createElement('video'); |
20 testExpected("video.networkState", HTMLMediaElement.prototype.NETWOR
K_EMPTY, "=="); | 22 testExpected("video.networkState", HTMLMediaElement.prototype.NETWOR
K_EMPTY, "=="); |
21 consoleWrite("<source> inserted by script."); | 23 consoleWrite("<source> inserted by script."); |
22 video.appendChild(document.createElement('source')); | 24 video.appendChild(document.createElement('source')); |
23 testExpected("video.networkState", HTMLMediaElement.prototype.NETWOR
K_NO_SOURCE, "=="); | 25 testExpected("video.networkState", HTMLMediaElement.prototype.NETWOR
K_NO_SOURCE, "=="); |
24 if (window.testRunner) | 26 if (window.testRunner) |
25 testRunner.notifyDone(); | 27 testRunner.notifyDone(); |
26 </script> | 28 </script> |
27 | 29 |
28 </body> | 30 </body> |
29 </html> | 31 </html> |
OLD | NEW |