Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / keyboardevent-repeat.html
blob7c46cdf24765da89e54c69e548de54ae009233ad
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent-repeat" />
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
9 description("Tests KeyboardEvent.repeat attribute");
11 var lastKeyboardEvent;
13 function recordKeyEvent(ev) {
14 ev = ev || event;
15 ev.keyCode = (ev.which || ev.keyCode);
16 if (window.eventSender) {
17 lastKeyboardEvent = ev;
18 } else {
19 debug("Type=" + ev.type + "," +
20 "keyCode=" + ev.keyCode + ',' +
21 "repeat=" + ev.repeat);
25 var textarea = document.createElement("textarea");
26 textarea.addEventListener("keydown", recordKeyEvent, false);
27 document.body.insertBefore(textarea, document.body.firstChild);
28 textarea.focus();
30 if (window.eventSender) {
31 eventSender.keyDown("a");
32 shouldBeFalse("lastKeyboardEvent.repeat");
34 eventSender.keyDown("a", ["autoRepeat"]);
35 shouldBeTrue("lastKeyboardEvent.repeat");
37 </script>
38 </body>
39 </html>