Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / focusinout.html
1 <html onfocusin="writePass('result5')" onfocusout="writePass('result6')">
2 <head>
3 <script>
4 if (window.testRunner)
5     window.testRunner.dumpAsText();
6
7 function writePass(id)
8 {
9     document.getElementById(id).innerHTML = "PASS";
10 }
11
12 function writeFailed(id, reason)
13 {
14     document.getElementById(id).innerHTML = "FAIL: " + reason;
15 }
16
17 function focusHandler(event)
18 {
19     if (event.type == "focusin")
20         writePass('result1');
21     else
22         writeFailed('result1', "Wrong event type");
23 }
24
25 function blurHandler(event)
26 {
27     if (event.type == "focusout")
28         writePass('result2');
29     else
30         writeFailed('result2', "Wrong event type");
31 }
32
33 function focusHandlerTwo(event)
34 {
35     if (event.type == "DOMFocusIn")
36         writePass('result3');
37     else
38         writeFailed('result3', "Wrong event type");
39 }
40
41 function blurHandlerTwo(event)
42 {
43     if (event.type == "DOMFocusOut")
44         writePass('result4');
45     else
46         writeFailed('result4', "Wrong event type");
47 }
48 </script>
49 </head>
50 <body onload="document.getElementById('field').focus();document.getElementById('field').blur()">
51
52 <form>
53 <input type=text id="field">
54 </form>
55
56 <div id="result1">FAIL</div>
57 <div id="result2">FAIL</div>
58 <div id="result3">FAIL</div>
59 <div id="result4">FAIL</div>
60 <div id="result5">FAIL</div>
61 <div id="result6">FAIL</div>
62
63 <script>
64 document.documentElement.addEventListener("focusin", focusHandler, false);
65 document.documentElement.addEventListener("focusout", blurHandler, false);
66 document.documentElement.addEventListener("DOMFocusIn", focusHandlerTwo, false);
67 document.documentElement.addEventListener("DOMFocusOut", blurHandlerTwo, false);
68 </script>
69