Closed
Bug 1009996
Opened 11 years ago
Closed 11 years ago
mochitest-devtools: EventUtils.synthesizeKeyExpectEvent reports is is not defined
Categories
(Testing :: Mochitest, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: anaran, Unassigned)
References
Details
Attachments
(1 file)
2.29 KB,
patch
|
rcampbell
:
review-
|
Details | Diff | Splinter Review |
Patch is forthcoming.
EventUtils needs to load SimpleTest in order to use method "is".
Reporter | ||
Comment 1•11 years ago
|
||
Attachment #8422162 -
Flags: review?(bgrinstead)
Comment 2•11 years ago
|
||
This is used in other tests throughout the code base, but this may be the first browser mochitest that tries to do so: http://dxr.mozilla.org/mozilla-central/search?q=synthesizekeyexpectevent&redirect=true
Updated•11 years ago
|
Summary: EventUtils.synthesizeKeyExpectEvent reports is is not defined → mochitest-devtools: EventUtils.synthesizeKeyExpectEvent reports is is not defined
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #2)
> This is used in other tests throughout the code base, but this may be the
> first browser mochitest that tries to do so:
> http://dxr.mozilla.org/mozilla-central/
> search?q=synthesizekeyexpectevent&redirect=true
Hmmh, so which is it not a problem there?
Are workarounds in place?
Comment 4•11 years ago
|
||
(In reply to adrian from comment #3)
> (In reply to Brian Grinstead [:bgrins] from comment #2)
> > This is used in other tests throughout the code base, but this may be the
> > first browser mochitest that tries to do so:
> > http://dxr.mozilla.org/mozilla-central/
> > search?q=synthesizekeyexpectevent&redirect=true
>
> Hmmh, so which is it not a problem there?
>
> Are workarounds in place?
As I said in Bug 1005471, I'm not sure if this is needed for the test you are working on. Either way, I'm not the right person to review this - if you do end up needing this, we will find someone else to review it.
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #4)
> (In reply to adrian from comment #3)
> > (In reply to Brian Grinstead [:bgrins] from comment #2)
> > > This is used in other tests throughout the code base, but this may be the
> > > first browser mochitest that tries to do so:
> > > http://dxr.mozilla.org/mozilla-central/
> > > search?q=synthesizekeyexpectevent&redirect=true
> >
> > Hmmh, so which is it not a problem there?
> >
> > Are workarounds in place?
>
> As I said in Bug 1005471, I'm not sure if this is needed for the test you
I do not need EventUtils at all, could just dispatch a KeyEvent (I tried this first and it works).
> are working on. Either way, I'm not the right person to review this - if
> you do end up needing this, we will find someone else to review it.
Shouldn't the broken synthesizeKeyExpectEvent be fixed regardless whether *I* need it?
I agree that this should not stop us from moving Bug 1005471 along.
Comment 6•11 years ago
|
||
Comment on attachment 8422162 [details] [diff] [review]
0001-Bug-1009996-loadSubScript-SimpleTest-into-EventUtils.patch
Review of attachment 8422162 [details] [diff] [review]:
-----------------------------------------------------------------
just use synthesizeKey.
Attachment #8422162 -
Flags: review?(bgrinstead) → review-
Updated•11 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 7•11 years ago
|
||
Can you please explain what's invalid about this bug report?
Comment 8•11 years ago
|
||
(In reply to adrian from comment #7)
> Can you please explain what's invalid about this bug report?
I think we just need to be careful about changing the EventUtils code since it is used for all kinds of tests. If the change isn't going to be used, then no need to make it.
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #8)
> (In reply to adrian from comment #7)
> > Can you please explain what's invalid about this bug report?
>
> I think we just need to be careful about changing the EventUtils code since
I'm all for proceeding carefully. I don't claim my patch is the correct solution.
> it is used for all kinds of tests. If the change isn't going to be used,
> then no need to make it.
But how could EventUtils.synthesizeKeyExpectEvent ever use the "in" method when it is not defining or requiring/loading it?
Comment 10•11 years ago
|
||
> > it is used for all kinds of tests. If the change isn't going to be used,
> > then no need to make it.
>
> But how could EventUtils.synthesizeKeyExpectEvent ever use the "in" method
> when it is not defining or requiring/loading it?
I think different tests may have different globals defined. For instance, you can run `mach mochitest-chrome toolkit/content/tests/chrome/test_datepicker.xul` and it passes.
You need to log in
before you can comment on or make changes to this bug.
Description
•