Title: [246417] trunk/LayoutTests
Revision
246417
Author
dba...@webkit.org
Date
2019-06-13 16:01:57 -0700 (Thu, 13 Jun 2019)

Log 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (246416 => 246417)


--- trunk/LayoutTests/ChangeLog	2019-06-13 21:59:41 UTC (rev 246416)
+++ trunk/LayoutTests/ChangeLog	2019-06-13 23:01:57 UTC (rev 246417)
@@ -1,3 +1,22 @@
+2019-06-13  Daniel Bates  <daba...@apple.com>
+
+        [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:
+
 2019-06-13  Truitt Savell  <tsav...@apple.com>
 
         Test gardening after r246406

Modified: trunk/LayoutTests/fast/events/ios/keyboard-event-key-attribute.html (246416 => 246417)


--- trunk/LayoutTests/fast/events/ios/keyboard-event-key-attribute.html	2019-06-13 21:59:41 UTC (rev 246416)
+++ trunk/LayoutTests/fast/events/ios/keyboard-event-key-attribute.html	2019-06-13 23:01:57 UTC (rev 246417)
@@ -30,6 +30,9 @@
 var i = 0;
 var testInput = document.getElementById("testInput");
 testInput._onkeydown_ = function(e) {
+    // Ignore the Shift key so as to normalize the test results across different iOS versions.
+    if (e.key == "Shift")
+        return;
     event = e;
     shouldBeEqualToString("event.key", "" + tests[i][0]);
     shouldBeEqualToString("event.code", "" + tests[i][1]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to