Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / frame-programmatic-focus.html
1 <html>
2 <head>
3     <script>
4         function log(msg) {
5             document.getElementById('log').appendChild(document.createTextNode(msg + '\n'));
6         }
7
8         function test() {
9             if (window.testRunner) {
10                 testRunner.dumpAsText();
11             }
12
13             window.onfocus = function() { log('main frame focused'); }
14             window.onblur = function() { log('main frame blurred'); }
15
16             var input = document.getElementsByTagName('input')[0];
17             input.onfocus = function() { log('<input> focused'); }
18             input.onblur = function() { log ('<input> blurred'); }
19
20             var w = document.getElementById('frame').contentWindow;
21             w.onfocus = function() { log('iframe focused'); }
22             w.onblur = function() { log('iframe blurred'); }
23
24             var inputInIframe = w.document.getElementsByTagName('input')[0];
25             inputInIframe.onfocus = function() { log('<input> in iframe focused'); }
26             inputInIframe.onblur = function() { log ('<input> in iframe blurred'); }
27
28             input.focus();
29             inputInIframe.focus();
30             input.focus();
31         }
32     </script>
33 </head>
34 <body onload="test()">
35     <input>
36     <iframe id="frame" src='javascript:"<input>"' style="width: 100px; height: 100px; margin: 0px; border: 2px solid black;"></iframe>
37     <p>This page tests that frames receive focus events when one of their child
38     elements is programmatically focused, and receive blur events when an
39     element not in that frame is programmatically focused.</p>
40
41     <pre id="log"></pre>
42 </body>
43 </html>