| <!doctype html> | |
| <html> | |
| <head> | |
| <title>networkState after inserting <source> test</title> | |
| <script src=video-test.js></script> | |
| </head> | |
| <body> | |
| <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> | |
| <script> | |
| 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, "=="); | |
| if (window.testRunner) | |
| testRunner.notifyDone(); | |
| </script> | |
| </body> | |
| </html> |