Bug 17670: Key events may improperly propagate from iframe to parent frame
[WebKit-https.git] / LayoutTests / fast / events / key-events-in-frame.html
1 <div>
2     This tests that key events targeting a frame do not propagate up the frame tree.  This will only produce output if the test fails.
3     <br />
4     To test manually click in the empty frame and press any key. If you receive any output the test has failed.
5 </div>
6 <pre id="log"></pre>
7 <iframe id="targetFrame" src="data:text/html,"></iframe>
8 <script>
9 onkeydown=function(){document.getElementById("log").innerHTML += 'FAIL: outerFrame received keydown\n'; };
10 onkeypress=function(){document.getElementById("log").innerHTML += 'FAIL: outerFrame received keypress\n'; };
11 onkeyup=function(){document.getElementById("log").innerHTML += 'FAIL: outerFrame received keyup\n'; };
12 document.getElementById("targetFrame").focus();
13 if (window.layoutTestController) {
14     layoutTestController.dumpAsText();
15     eventSender.keyDown("a");
16 }
17 </script>