| <title>networkState after inserting <source> test</title> |
| <script src=video-test.js></script> |
| <video controls><source></video> |
| <p>Test that a <source> inserted when networkState is NETWORK_NO_SOURCE triggers |
| resource selection, immediately changing networkState to NETWORK_NO_SOURCE.</p> |
| consoleWrite("<source> inserted by the parser."); |
| video = document.querySelector('video'); |
| testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_NO_SOURCE, "=="); |
| consoleWrite("<br><video> created with script."); |
| video = document.createElement('video'); |
| testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_EMPTY, "=="); |
| consoleWrite("<source> inserted by script."); |
| video.appendChild(document.createElement('source')); |
| testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_NO_SOURCE, "=="); |