upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / media / video-source-inserted.html
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>
9
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>
12
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, "==");
17
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.layoutTestController)
25                 layoutTestController.notifyDone();
26         </script>
27
28     </body>
29 </html>