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

Changeset 249028 in webkit


Ignore:
Timestamp:
Aug 22, 2019, 2:30:46 PM (7 years ago)
Author:
timothy_horton@apple.com
Message:

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.

Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249026 r249028  
     12019-08-22  Tim Horton  <timothy_horton@apple.com>
     2
     3        REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=201050
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        * fast/events/ios/select-all-with-existing-selection.html:
     9        The test as-written doesn't actually wait for the tap to complete before
     10        continuing on with the test - it starts immediately when the focus event
     11        fires. This results in the selection being changed by the single click
     12        handler *after* focusing the field.
     13
     14        Rewrite the test to await completion of the tap before moving forward
     15        instead of waiting for focus.
     16
    1172019-08-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
    218
  • trunk/LayoutTests/fast/events/ios/select-all-with-existing-selection.html

    r246908 r249028  
    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.