Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-source-inserted.html
blob20edb0e33715f7b482d7355826c5d5214a1fae25
1 <!doctype html>
2 <html>
3 <head>
4 <title>networkState after inserting &lt;source&gt; test</title>
5 <script src=video-test.js></script>
6 </head>
7 <body>
8 <video controls><source></video>
10 <p>Test that a &lt;source&gt; inserted when networkState is NETWORK_NO_SOURCE triggers
11 resource selection, immediately changing networkState to NETWORK_NO_SOURCE.</p>
13 <script>
14 consoleWrite("&lt;source&gt; inserted by the parser.");
15 video = document.querySelector('video');
16 testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_NO_SOURCE, "==");
18 consoleWrite("<br>&lt;video&gt; created with script.");
19 video = document.createElement('video');
20 testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_EMPTY, "==");
21 consoleWrite("&lt;source&gt; inserted by script.");
22 video.appendChild(document.createElement('source'));
23 testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_NO_SOURCE, "==");
24 if (window.testRunner)
25 testRunner.notifyDone();
26 </script>
28 </body>
29 </html>