Closed Bug 1438891 Opened 6 years ago Closed 6 years ago

JavaScript error: resource://mozmill/modules/frame.js -> file:///c:/mozilla-source/comm-central/mail/test/mozmill/shared-modules/test-window-helpers.js, line 1456: TypeError: aWindow is undefined.

Categories

(Thunderbird :: Testing Infrastructure, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 60.0

People

(Reporter: jorgk-bmo, Assigned: aceman)

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1438825 +++

As per bug 1438825 comment #5, likely a fallout from bug 1437269.
It may not cause a test failure right now but it indicates a bug. If the key isn't in the list yet and we can't fetch it and return some junk and the test passes anyway, then what is it testing? Or it doesn't actually need the key.
Assignee: nobody → acelists
Component: General → Testing Infrastructure
Attached patch 1438891.patch (obsolete) — Splinter Review
Using event.key worked for me as far as I could see in our tests (I dumped what it contains for all the calls of describeKeyEvent), and try run is here:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=9d6332a8fd32f6f87734a848c1360276324fa074

Boris, could this be correct? The describeKeyEvent function seems to produce some readable representation of what key was pressed.
Attachment #8951882 - Flags: feedback?(bzbarsky)
(In reply to :aceman from comment #2)
> https://treeherder.mozilla.org/#/jobs?repo=try-comm-
> central&revision=9d6332a8fd32f6f87734a848c1360276324fa074
That failure is fixed in bug 1438825, BTW ;-)
Comment on attachment 8951882 [details] [diff] [review]
1438891.patch

event.key will certainly produce a "printable representation" of the key (though for a whitespace printable character like "space" it will be that whitespace character).  I have no idea whether this function wants the DOM_VK_whatever string or whether any old string will do.  I somewhat doubt that for the "space" case returning " " from describeKeyEvent is what's really desired, though.
Attachment #8951882 - Flags: feedback?(bzbarsky)
Attached patch patch v2Splinter Review
Let's finish this in some way.
It fixes a real bug of calling non-existent event.window. I have also found another bug in that same function, at the event.ctrlKey which hoses the output and no key (s) is actually returned when Ctrl is hold too. Good that I actually tested what the function returns on some real tests :)
Attachment #8951882 - Attachment is obsolete: true
Attachment #8957826 - Flags: review?(jorgk)
Status: NEW → ASSIGNED
Comment on attachment 8957826 [details] [diff] [review]
patch v2

What is describeKeyEvent() used for? Does the return value matter for anything? Looks like it doesn't with the |s = "ctrl-"; + s| ;-(
Attachment #8957826 - Flags: review?(jorgk) → review+
No the return value isn't used, it is just logged via mark_action(). This is some debug output that you can enable to trace what actions mozmill is doing. But I haven't yet found a way how to see that output. I think some prefs need to be set, but what I tried didn't work yet.
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/57ed2a26e5fd
do not use event.window in test-window-helpers.js. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 60.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: