Closed
Bug 531211
Opened 16 years ago
Closed 11 years ago
Sometimes keypress events with altKey and ctrlKey aren't properly sent when using in combination with F4
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: u279076, Unassigned)
References
Details
Attachments
(2 files)
When writing a test to close the Download Manager window via ALT+F4 on Linux, I noticed Mozmill was merely focusing the browser window. It was not closing the DM dialog.
Whimboo and I investigate further and noticed the same behaviour on normal browser windows using controller.keypress. Upon deeper investigation, I stumbled upon some real weirdness...
STR:
1. start firefox with 1 window, open mozmill
2. var controller = mozmill.getBrowserController();
3. controller.keypress(null, 'VK_F4', {altKey:true});
4. Open a new window
5. controller.keypress(null, 'VK_F4', {altKey:true});
6. Open a new window
7. controller.keypress(null, 'VK_F4', {altKey:true});
8. open 2 more (total of 4 windows open)
9. controller.keypress(null, 'VK_F4', {altKey:true});
10. var controller = mozmill.getBrowserController();
11. controller.keypress(null, 'VK_F4', {altKey:true}); --> a window is closed
RESULTS:
1. In step 3, the browser window is focused not closed
2. In step 5, one of the browser windows is focused not closed
3. In step 7, one of the browser windows is closed and another comes into focus
4. In step 9, the following error occurs. Step 10 resolves the error.
"Error:Error: Synthesizing key event failed. TypeError: win.KeyEvent is undefined"
5. In step 11, one of the browser windows is closed and another comes into focus
So it seems there are 3 things happening here:
1. windowCount < 3: window is just focused, not closed
2. windowCount = 3: behaves correctly
3. windowCount > 3: must create new instance of controller first
NOTE: All of this testing is done within the IDE itself. But I get the same results running from command line as well.
NOTE 2: All controller.keypress() return TRUE in this test.
NOTE 3: This is only reproducible on Linux so far.
NOTE 4: All testing done using Mozmill 1.3
Comment 1•16 years ago
|
||
As we talked yesterday it's the same problem on Windows and I bet on OS X too.
I would really like to see a small Mozmill test with the embedded keyboard test page (http://bugzilla.mozilla.org/attachment.cgi?id=55849&action=view). Anthony, can you create a test which does the following:
1. Open a window (one, two, or as many as we need to make this visible)
2. Load the url
3. Fire the shortcuts
OS: Linux → All
Hardware: x86 → All
Summary: [linux] Mozmill doesn't properly initiate CTRL+F4/ALT+F4 → Sometimes keypress events with altKey and ctrlKey aren't properly sent when using in combination with F4
Here is a minimized test case for the "ALT+F4 on less than 3 windows" scenario.
The keypress test page captures and reports the event properly, however the window should close. It does not. Running this in the Mozmill IDE, all events are returned as TRUE.
Comment 4•16 years ago
|
||
(In reply to comment #3)
> The keypress test page captures and reports the event properly, however the
That's correct. Looks like the correct event is fired.
> window should close. It does not. Running this in the Mozmill IDE, all events
> are returned as TRUE.
No, with the page open the window will not close because it captures really all events. You should add another test which doesn't load this page to demonstrate that alt+f4 doesn't work.
Attachment #414756 -
Attachment description: Minimized test case (ALT+F4) → Minimized test case (ALT+F4) - using keypress test page
Here is a minimized test case for trying to invoke ALT+F4 on the download manager window. The key event returns TRUE in Mozmill but the window does not close.
Comment 6•11 years ago
|
||
Mozmill will reach its end of life soon. We are currently working on getting all the tests for Firefox ported to Marionette. For status updates please see bug 1080766.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•9 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•