Closed
Bug 1255806
Opened 9 years ago
Closed 9 years ago
marionette/event.js is still using obsolete nsIDOMWindowUtils.sendKeyEvent()
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox48 fixed, firefox49 fixed)
RESOLVED
FIXED
mozilla49
People
(Reporter: masayuki, Assigned: automatedtester)
References
Details
(Keywords: pi-marionette-server)
Attachments
(1 file)
marionette/event.js is still using nsIDOMWindowUtils.sendKeyEvent() which was already obsolete for a year (at least).
When I work on bug 1154183, I hit this issue. Bug 1154183 will change shortcut key handling of reserved shortcut keys (e.g., Ctrl+T, Ctrl+W, Ctrl+N). They will be handled with keydown event. But charCode of keydown event is always 0. Therefore, native event handler and TextInputProcessor add some necessary information to WidgetKeyboardEvent which is internal class of DOM KeyboardEvent.
However, nsIDOMWindowUtils.sendKeyEvent() cannot set such additional information due to its poor arguments. Therefore, all automated tests should use nsITextInputProcessor instead.
Looks like that marionette/event.js is ported from EventUtils.js for mochitests. So, marionette staff should port current EventUtils.synthesizeKey() and _getTIP().
Andreas Tolfsen, could you take a look for this? Bug 1154183 should be fixed as soon as possible.
Flags: needinfo?(ato)
Reporter | ||
Comment 1•9 years ago
|
||
I changed the approach to fix bug 1154183, then, this becomes not necessary to fix soon. However, this should be done for bug 1134542, anyway. So, I still hope that somebody of Marionette staff tries to fix this bug.
No longer blocks: 1154183
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → dburns
Flags: needinfo?(ato)
Assignee | ||
Comment 2•9 years ago
|
||
nsIDOMWindowUtils.sendKeyEvent() has been made obsolete so this removes its use
in Marionette
Review commit: https://reviewboard.mozilla.org/r/51715/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/51715/
Attachment #8750981 -
Flags: review?(ato)
Assignee | ||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Can you confirm whether this patch is an import of (select features from) the newer EventUtils.js used by Mochitests?
Flags: needinfo?(dburns)
Keywords: ateam-marionette-server
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Andreas Tolfsen ‹:ato› from comment #4)
> Can you confirm whether this patch is an import of (select features from)
> the newer EventUtils.js used by Mochitests?
Yup, literally copied things over and then "restyled" them to match the rest of the file.
Flags: needinfo?(dburns)
Comment 6•9 years ago
|
||
Comment on attachment 8750981 [details]
MozReview Request: Bug 1255806: remove use of nsIDOMWindowUtils.sendKeyEvent from Marionette r?ato
https://reviewboard.mozilla.org/r/51715/#review49081
Well try appears to be passing, which wasn’t the case when I tried to import the whole, new Mochitest EventUtils.js file. Please ship it.
Attachment #8750981 -
Flags: review?(ato) → review+
Comment 8•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Comment 9•8 years ago
|
||
bugherder uplift |
status-firefox48:
--- → fixed
Assignee | ||
Comment 10•8 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•