2 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=37718">bug
37718</a>:
3 Crash when replaying a sequence of keyboard events.
</p>
4 <iframe src=
"about:blank"></iframe>
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
13 frames
[0].document
.write("<div contenteditable onkeydown='top.record(event)'></div>");
14 frames
[0].document
.getElementsByTagName("div")[0].focus();
15 if (window
.eventSender
)
16 eventSender
.keyDown("a");
19 function record(event
)
21 document
.getElementById("p").innerHTML
= "Testing...";
22 window
.recordedEvent
= event
;
24 setTimeout(function() {
26 document
.body
.removeChild(document
.getElementsByTagName("iframe")[0]);
28 setTimeout(function() {
30 window
.recordedEvent
.charCode
;
31 window
.recordedEvent
.keyCode
;
32 document
.getElementById("p").innerHTML
= "PASS";
33 if (window
.testRunner
)
34 testRunner
.notifyDone();
40 <p id=p
>Please press any key.
</p>