Need automated tests for Caps Lock key events

RESOLVED FIXED

Status

()

RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

spun off from bug 457523.

We need automated tests for Caps Lock key. The patch is coming soon.
Created attachment 343074 [details] [diff] [review]
Patch v1.0

I added keydown/keyup testing code.

We have two issues:

1. Only on Windows, the modifier keydown/keyup events are fired from syntesizeNativeKeyEvent. So, this patch needs to ignore the key events. It seems that Mac should fire these events too.

2. The key up events are not fired on Mac when Command key is pressed.

But these issues should be out of scope of this bug.
Attachment #343074 - Flags: superreview?(roc)
Attachment #343074 - Flags: review?(roc)
+  const SHOULD_DELIVED_NONE         = 0x0;
+  const SHOULD_DELIVED_KEYDOWN      = 0x1;
+  const SHOULD_DELIVED_KEYPRESS     = 0x2;
+  const SHOULD_DELIVED_KEYUP        = 0x4;
+  const SHOULD_DELIVED_ALL          = SHOULD_DELIVED_KEYDOWN |
+                                      SHOULD_DELIVED_KEYPRESS |
+                                      SHOULD_DELIVED_KEYUP;

I think DELIVED is meant to be DELIVER.

+  const SHOULD_NOT_DELIVED_KEYPRESS = SHOULD_DELIVED_KEYDOWN |
+                                      SHOULD_DELIVED_KEYUP;
+  const SHOULD_NOT_DELIVED_KEYUP    = SHOULD_DELIVED_KEYDOWN |
+                                      SHOULD_DELIVED_KEYPRESS;

I wouldn't use NOT. I'd just say SHOULD_DELIVER_KEYDOWN_KEYUP and SHOULD_DELIVER_KEYDOWN_KEYPRESS.
Created attachment 343178 [details] [diff] [review]
Patch v1.1

renamed them.
Attachment #343074 - Attachment is obsolete: true
Attachment #343178 - Flags: superreview?(roc)
Attachment #343178 - Flags: review?(roc)
Attachment #343074 - Flags: superreview?(roc)
Attachment #343074 - Flags: review?(roc)
Attachment #343178 - Flags: superreview?(roc)
Attachment #343178 - Flags: superreview+
Attachment #343178 - Flags: review?(roc)
Attachment #343178 - Flags: review+
checked-in.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.