⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249049 in webkit


Ignore:
Timestamp:
Aug 23, 2019, 10:06:24 AM (7 years ago)
Author:
Ryan Haddad
Message:

Cherry-pick r249028. rdar://problem/54614691

REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=201050

Reviewed by Wenson Hsieh.

  • fast/events/ios/select-all-with-existing-selection.html: The test as-written doesn't actually wait for the tap to complete before continuing on with the test - it starts immediately when the focus event fires. This results in the selection being changed by the single click handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-608-branch/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608-branch/LayoutTests/ChangeLog

    r249048 r249049  
     12019-08-23  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Cherry-pick r249028. rdar://problem/54614691
     4
     5    REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
     6    https://bugs.webkit.org/show_bug.cgi?id=201050
     7   
     8    Reviewed by Wenson Hsieh.
     9   
     10    * fast/events/ios/select-all-with-existing-selection.html:
     11    The test as-written doesn't actually wait for the tap to complete before
     12    continuing on with the test - it starts immediately when the focus event
     13    fires. This results in the selection being changed by the single click
     14    handler *after* focusing the field.
     15   
     16    Rewrite the test to await completion of the tap before moving forward
     17    instead of waiting for focus.
     18   
     19   
     20    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     21
     22    2019-08-22  Tim Horton  <timothy_horton@apple.com>
     23
     24            REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
     25            https://bugs.webkit.org/show_bug.cgi?id=201050
     26
     27            Reviewed by Wenson Hsieh.
     28
     29            * fast/events/ios/select-all-with-existing-selection.html:
     30            The test as-written doesn't actually wait for the tap to complete before
     31            continuing on with the test - it starts immediately when the focus event
     32            fires. This results in the selection being changed by the single click
     33            handler *after* focusing the field.
     34
     35            Rewrite the test to await completion of the tap before moving forward
     36            instead of waiting for focus.
     37
    1382019-08-23  Ryan Haddad  <ryanhaddad@apple.com>
    239
  • branches/safari-608-branch/LayoutTests/fast/events/ios/select-all-with-existing-selection.html

    r246908 r249049  
    2727}
    2828
    29 function runTest()
     29async function runTest()
    3030{
    3131    let testElement = document.getElementById("test");
    3232    console.assert(testElement.value.indexOf("word") !== -1);
    33     function handleFocus() {
    34         document.addEventListener("selectionchange", testSelectAll, { once: true });
    35         testElement.setSelectionRange(testElement.value.indexOf("word"), testElement.value.length);
    36     }
    37     testElement.addEventListener("focus", handleFocus, { once: true });
    3833
    3934    if (window.testRunner)
    40         UIHelper.activateElement(testElement);
     35        await UIHelper.activateElement(testElement);
    4136    else
    4237        testElement.focus();
     38
     39    document.addEventListener("selectionchange", testSelectAll, { once: true });
     40    testElement.setSelectionRange(testElement.value.indexOf("word"), testElement.value.length);
    4341}
    4442
Note: See TracChangeset for help on using the changeset viewer.