| OLD | NEW | 
|   1 <body |   1 <body | 
|   2    onkeypress="log(eventInfo(event))" |   2    onkeypress="log(eventInfo(event))" | 
|   3    onkeydown="log(eventInfo(event))" |   3    onkeydown="log(eventInfo(event))" | 
|   4    onkeyup="log(eventInfo(event))"> |   4    onkeyup="log(eventInfo(event))"> | 
|   5 <p>Test that arrow keys do not dispatch keypress events even if there is no defa
    ult handler.</p> |   5 <p>Test that arrow keys do not dispatch keypress events even if there is no defa
    ult handler.</p> | 
|   6 <p>To test manually, press arrow keys and verify that no keypress events are log
    ged.</p> |   6 <p>To test manually, press arrow keys and verify that no keypress events are log
    ged.</p> | 
|   7 <div id="log"></div> |   7 <div id="log"></div> | 
|   8  |   8  | 
|   9 <script> |   9 <script> | 
|  10 function log(msg) { |  10 function log(msg) { | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
|  33       event = window.event; |  33       event = window.event; | 
|  34     target = event.srcElement ? event.srcElement : event.target; |  34     target = event.srcElement ? event.srcElement : event.target; | 
|  35     if (event.type == "textInput") |  35     if (event.type == "textInput") | 
|  36         return (where ? "(" + where + ") " : "") + target.tagName + " - " + even
    t.type + " - " + event.data |  36         return (where ? "(" + where + ") " : "") + target.tagName + " - " + even
    t.type + " - " + event.data | 
|  37             + '. Value: "' + target.value + '".'; |  37             + '. Value: "' + target.value + '".'; | 
|  38     else if (event.type == "keydown" || event.type == "keypress" || event.type =
    = "keyup")  |  38     else if (event.type == "keydown" || event.type == "keypress" || event.type =
    = "keyup")  | 
|  39         return (where ? "(" + where + ") " : "") + target.tagName |  39         return (where ? "(" + where + ") " : "") + target.tagName | 
|  40             + (target.tagName == "INPUT" ? " " + target.type : "") |  40             + (target.tagName == "INPUT" ? " " + target.type : "") | 
|  41             + " - " + event.type |  41             + " - " + event.type | 
|  42             + ' - ' + [event.ctrlKey, event.altKey, event.shiftKey, event.metaKe
    y] |  42             + ' - ' + [event.ctrlKey, event.altKey, event.shiftKey, event.metaKe
    y] | 
|  43             + ' - ' + event.keyIdentifier |  43             + ' - ' + event.key | 
|  44             + ' - ' + (event.location === undefined ? "undefined" : locationName
    (event.location)) |  44             + ' - ' + (event.location === undefined ? "undefined" : locationName
    (event.location)) | 
|  45             + ' - ' + event.keyCode |  45             + ' - ' + event.keyCode | 
|  46             + ' - ' + event.charCode; |  46             + ' - ' + event.charCode; | 
|  47  |  47  | 
|  48     } catch (ex) { |  48     } catch (ex) { | 
|  49         alert(ex); |  49         alert(ex); | 
|  50     } |  50     } | 
|  51 } |  51 } | 
|  52 log("target - type - " + ["ctrlKey", "altKey", "shiftKey", "metaKey"] |  52 log("target - type - " + ["ctrlKey", "altKey", "shiftKey", "metaKey"] | 
|  53         + ' - ' + "keyIdentifier" |  53         + ' - ' + "key" | 
|  54         + ' - ' + "location" |  54         + ' - ' + "location" | 
|  55         + ' - ' + "keyCode" |  55         + ' - ' + "keyCode" | 
|  56         + ' - ' + "charCode"); |  56         + ' - ' + "charCode"); | 
|  57  |  57  | 
|  58 if (window.testRunner) { |  58 if (window.testRunner) { | 
|  59     testRunner.dumpAsText(); |  59     testRunner.dumpAsText(); | 
|  60     eventSender.keyDown("ArrowLeft", []); |  60     eventSender.keyDown("ArrowLeft", []); | 
|  61 } |  61 } | 
|  62  |  62  | 
|  63 </script> |  63 </script> | 
|  64  |  64  | 
|  65 </body> |  65 </body> | 
| OLD | NEW |