Currently, we deliver this as keydown(A), keyup(A) but WebDriver tests expect this to be delivered as keydown(SHIFT), keydown(A), keyup(A), keyup(SHIFT) if the shift modifier is not already set via an earlier key press. Note that this means the text HELLO would keydown/keyup the shift key 5 times, because it's not sustained across keystrokes (even if a user might type it that way).
<rdar://problem/32277988>
Created attachment 310727 [details] Patch
Comment on attachment 310727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=310727&action=review r=me > Source/WebKit2/UIProcess/Automation/mac/WebAutomationSessionMac.mm:521 > + case 'A': > + case 'B': > + case 'C': > + case 'E': > + case 'F': > + case 'G': > + case 'H': > + case 'I': > + case 'J': > + case 'K': > + case 'L': > + case 'M': > + case 'N': > + case 'O': > + case 'P': > + case 'Q': > + case 'R': > + case 'S': > + case 'T': > + case 'U': > + case 'V': > + case 'W': > + case 'X': > + case 'Y': > + case 'Z': Can we turn this into an easier to read if statement: if (c >= 'A' && c <= 'Z') return YES; The rest can still be in this switch. I realize by putting them all in the switch the compiler might manage some smarter codegen, but I think readability is more important here.
Committed r217244: <http://trac.webkit.org/changeset/217244>