Changeset 246417 in webkit


Ignore:
Timestamp:
Jun 13, 2019 4:01:57 PM (5 years ago)
Author:
dbates@webkit.org
Message:

[iOS] Normalize test result of fast/events/ios/keyboard-event-key-attribute.html to handle possible modifier dispatch
https://bugs.webkit.org/show_bug.cgi?id=198835
<rdar://problem/46082708>

Reviewed by Darin Adler.

WebKit now knows how to handle flag change events on iOS and dispatch DOM events just like Mac.
Until USE(UIKIT_KEYBOARD_ADDITIONS) is enabled by default WebKit does not expect to receive
modifier flag changes. But once this compile time flag is enabled it will and the test
fast/events/ios/keyboard-event-key-attribute.html will fail because it types '@' and only
expects to see a single keydown for '@' even though it actually requires two key downs to
generate an '@': Shift, and 2 (on a US keyboard layout). We have a bunch of other tests to
check that modifier key presses generate DOM events. So, let's just normalize the result of
this test to ignore Shift keydowns.

  • fast/events/ios/keyboard-event-key-attribute.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246416 r246417  
     12019-06-13  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Normalize test result of fast/events/ios/keyboard-event-key-attribute.html to handle possible modifier dispatch
     4        https://bugs.webkit.org/show_bug.cgi?id=198835
     5        <rdar://problem/46082708>
     6
     7        Reviewed by Darin Adler.
     8
     9        WebKit now knows how to handle flag change events on iOS and dispatch DOM events just like Mac.
     10        Until USE(UIKIT_KEYBOARD_ADDITIONS) is enabled by default WebKit does not expect to receive
     11        modifier flag changes. But once this compile time flag is enabled it will and the test
     12        fast/events/ios/keyboard-event-key-attribute.html will fail because it types '@' and only
     13        expects to see a single keydown for '@' even though it actually requires two key downs to
     14        generate an '@': Shift, and 2 (on a US keyboard layout). We have a bunch of other tests to
     15        check that modifier key presses generate DOM events. So, let's just normalize the result of
     16        this test to ignore Shift keydowns.
     17
     18        * fast/events/ios/keyboard-event-key-attribute.html:
     19
    1202019-06-13  Truitt Savell  <tsavell@apple.com>
    221
  • trunk/LayoutTests/fast/events/ios/keyboard-event-key-attribute.html

    r210668 r246417  
    3131var testInput = document.getElementById("testInput");
    3232testInput.onkeydown = function(e) {
     33    // Ignore the Shift key so as to normalize the test results across different iOS versions.
     34    if (e.key == "Shift")
     35        return;
    3336    event = e;
    3437    shouldBeEqualToString("event.key", "" + tests[i][0]);
Note: See TracChangeset for help on using the changeset viewer.