Closed Bug 432773 Opened 13 years ago Closed 13 years ago
a few additional key tests
-- Add PR_LOGGING code so that Cocoa can dump the available keyboard layouts on startup. This is helpful for creating tests. -- Remove the assertion that aNativeKeyboardLayout is nonzero, since zero is a perfectly valid layout ID (it's the "US" layout). -- Add tests for XUL <key> activation on Mac and Windows. -- Refactor the test code a bit. -- Use the "US" layout on Mac instead of "US-Extended" for consistency with Windows. -- Add test for bugs 359638 and 429160 on Mac and Windows. -- Add test for bug 432112 on Windows. The test currently does not work on Mac because the existing testing code can't get the layout resource for Swedish.
(In reply to comment #0) > -- Use the "US" layout on Mac instead of "US-Extended" for consistency with > Windows. Maybe, we should not use LMGetKbdType API for the testing. Because the testcases assume that the target keyboard type is ANSI for US/US-Extended. See bug 432388 comment 16 to 18.
I'll switch the tests back to US-Extended. Does US-Extended actually have the same problem --- are there JIS US-Extended layouts?
The only change from the previous patch is to leave the Mac US keyboard layout as US-Extended. There may still be a problem with non-ANSI US-Extended layouts, but at least this patch isn't making things worse, so we should still take it.
(In reply to comment #2) > I'll switch the tests back to US-Extended. Does US-Extended actually have the > same problem --- are there JIS US-Extended layouts? Yes. But if we are only using alphabes/numerics, then the all keys are same value between ANSI and JIS. If we need to test symbols (e.g., ':'), we should fix it.
We should, but I'm not sure how, and I'd still like to land this patch since the Tinderboxes will pass.
ok. but it may be easy. see |GetUSLayoutCharFromKeyTranslate| of the patch of bug 432389. I just set 40 to mKbType. That works fine for me.
Comment on attachment 319995 [details] [diff] [review] patch v2 No longer applies.
Updated to trunk. This should pass on Tinderbox (10.4 with a real US keyboard). These tests still don't pass on 10.5 and won't pass with a non-ANSI US keyboard. We'll fix those issues separately.
Attachment #320071 - Flags: review?(joshmoz)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
+// test currently does not work, getting the Swedish layout fails I suspect Matthew's Keyboard Layout Services work could help here.
You need to log in before you can comment on or make changes to this bug.