Closed Bug 1009996 Opened 11 years ago Closed 11 years ago

mochitest-devtools: EventUtils.synthesizeKeyExpectEvent reports is is not defined

Categories

(Testing :: Mochitest, defect)

32 Branch
x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: anaran, Unassigned)

References

Details

Attachments

(1 file)

Patch is forthcoming. EventUtils needs to load SimpleTest in order to use method "is".
Blocks: 1005471
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
Summary: EventUtils.synthesizeKeyExpectEvent reports is is not defined → mochitest-devtools: EventUtils.synthesizeKeyExpectEvent reports is is not defined
(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?
(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.
(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 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-
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Can you please explain what's invalid about this bug report?
(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.
(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?
> > 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.

Attachment

General

Created:
Updated:
Size: