Closed Bug 720087 Opened 12 years ago Closed 11 years ago

Use EventUtils sendChar() and sendKey(), instead of calling synthesizeKey() directly

Categories

(Testing :: Mochitest, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sgautherie, Unassigned)

References

(Depends on 3 open bugs, )

Details

(Whiteboard: [good first bug][mentor=sgautherie][lang=js] [meta])

sendChar() and sendKey() are higher level functions.

There might be cases where synthesizeKey() is actually needed,
but I don't expect them to be many.

"Too many hits, displaying the first 1000"
Probably worth doing this in chunks (and maybe dependent bugs),
and using some kind of macro to replace them.
Blocks: 718545
No longer blocks: 718545
Depends on: 718545
Good luck!
Assignee: nobody → karun.84
Hi, I plan on working on this bug. I am thinking it could be broken up by mobile, dom, services, etc ...
Depends on: 721495
(In reply to Karun Dambiec from comment #2)

> Hi, I plan on working on this bug.

You're welcome!

> I am thinking it could be broken up by mobile, dom, services, etc ...

Yes, you can file blocking bugs for areas/chunks you do ;-)
Status: NEW → ASSIGNED
(In reply to Serge Gautherie (:sgautherie) from comment #3)
> (In reply to Karun Dambiec from comment #2)
> 
> > Hi, I plan on working on this bug.
> 
> You're welcome!
> 
> > I am thinking it could be broken up by mobile, dom, services, etc ...
> 
> Yes, you can file blocking bugs for areas/chunks you do ;-)

Yes, this seems like a good way, that way someone working on a particular component can review the changes. I have just completed the first patch for the password manager component.
Depends on: 721512
Depends on: 722264
Depends on: 711906
In Bug 711906, it is saying that sendKey should be removed. Is this correct? If it is then there is no need to use sendKey instead of synthesizeKey.
(In reply to Karun Dambiec from comment #5)
> In Bug 711906, it is saying that sendKey should be removed. Is this correct?
> If it is then there is no need to use sendKey instead of synthesizeKey.

Let's discuss that there.
Depends on: 732705
Assignee: karun.84 → nobody
Status: ASSIGNED → NEW
Whiteboard: [good first bug][mentor=sgautherie][lang=js] → [good first bug][mentor=sgautherie][lang=js] [meta]
+  test: function() { sendChar("H");; },

This line has two semicolons. Remove one of them.

In all the cases where sendChar is called, you should call it with the lowercase letter for the key. For example use sendChar("h") which sends the 'h' key instead of sendChar("H") which sends shift+h and could have otherwise lead to subtly differently behaviour.
Whoops, that comments was meant for bug 721512
Is this bug still valid?
Neil,

What is the current state with this issue with send_keys vs synthesize keys etc? I think we need a new description here and a clear statement of what is required and what is needed in order for this to be a good, clear, actionable mentored bug.
Flags: needinfo?(enndeakin)
Bug 711906 is kind of wanting the opposite of this, so I think first needs to be decided if this bug or that bug gets WONTFIX-ed.
There's nothing to do in this bug. Tests should use synthesizeKey or sendChar, and there isn't any reason to change existing tests. Removing sendKey is fine too.
Flags: needinfo?(enndeakin)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.