Open Bug 1068735 Opened 6 years ago Updated 3 years ago

Re-enable test_uppercase_alpha_keys test


(Testing :: Marionette, defect, P2)



(Not tracked)


(Reporter: automatedtester, Unassigned)


(Depends on 1 open bug, Blocks 1 open bug)


(Keywords: pi-marionette-server, pi-marionette-task)

In fixing bug 947490 I switched all the typing tests on but this test had to be disabled and we need to re enable it.
I assume the issue here is that we do not yet check if the character is shifted or not:

At least I cannot find any check for that like in the `action.Key` class. There is only the KEY_CODE_LOOKUP table in `action.js`, but that doesn't set the relationship between a lowercase or uppercase character.

Maja, since you implemented the action sequences, do you know more about that? Maybe I miss something?
Flags: needinfo?(mjzffr)
The "shifted character" comment in the spec is new relative to the implementation in action.js -- feel free to add another map to keep track of shifted status.

Right now, if an uppercase key value is passed in an actions sequence, action.js sets the "key", "code", "location" properties, and  event.js determines the correct keyCode+charCode when constructing the event, but the shift property is left as is. (That is, we don't set shift to "true" on the event object as a result of seeing an action for "keydown"+"A".) I'm not sure the resulting event is considered well-formed. I can imagine a device that sends uppercase keys without any form of "shift" being pressed, in which case such an event would make sense. The UIEvents spec explains that the key/code/modifier values are device-dependent, so I guess that's okay? 

In any case, in actions the shift property of the event is only changed to true if the sequence actually includes a "keydown" action for "shift". That's consistent with what is specified in the Webdriver spec re sendKeys: in, it sounds like you need to add {"type": "keydown", "value":<shift key>} to the action sequence being constructed every time an uppercase key is encountered in the input to sendKeys.
Flags: needinfo?(mjzffr)
This seems like a potential conformance issue.
Blocks: webdriver
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Version: unspecified → Trunk
We only have to fix this once, for the actions API, if we fix bug 1418995 first.
Depends on: 1418995
Summary: testUppercaseAlphaKeys needs to be re enabled → Re-enable test_uppercase_alpha_keys test
You need to log in before you can comment on or make changes to this bug.