Closed Bug 1438891 Opened 3 years ago Closed 3 years ago
Script error: resource://mozmill/modules/frame .js -> file:///c:/mozilla-source/comm-central/mail/test/mozmill/shared-modules/test-window-helpers .js, line 1456: Type Error: a Window is undefined .
+++ 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
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.
(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.
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 :)
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.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/comm-central/rev/57ed2a26e5fd do not use event.window in test-window-helpers.js. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.