Closed Bug 459820 Opened 16 years ago Closed 16 years ago

Need automated tests for Caps Lock key events

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file, 1 obsolete file)

spun off from bug 457523.

We need automated tests for Caps Lock key. The patch is coming soon.
Attached patch Patch v1.0 (obsolete) — Splinter Review
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.
Attached patch Patch v1.1Splinter Review
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
Closed: 16 years ago
Resolution: --- → FIXED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: