Changeset 254437 in webkit


Ignore:
Timestamp:
Jan 13, 2020 9:52:48 AM (4 years ago)
Author:
Wenson Hsieh
Message:

[iOS] editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html times out
https://bugs.webkit.org/show_bug.cgi?id=206126
<rdar://problem/58060387>

Reviewed by Tim Horton.

This test is intended to verify that when ranged selection UI covers up most of the view, tapping the selection
will clear the selection instead of toggling the callout bar. However, there are a couple of issues that make
this test fail:

  • The long press that is intended to select text ends up under the "Sel" in select and above the "ect" that

wraps to the next line, which causes the word to not be selected. To fix this, I changed the tap location from
the center of the view to somewhere in the top half of the view, near the middle of "Sel".

  • The callout bar appears in the center of the screen with the "Look up" action in the middle, so tapping the

center of the view again causes a view controller to be presented when looking up the selected word ("Select").
We can avoid this by also moving the tap location away from the center of the view.

  • On iPad, the word "Select" isn't big enough to encompass most of the screen even at 250px, so the test fails.

We fix this by making the "Select" text much bigger (500px), and then make the body overflow: hidden so that
selecting the word on iPhone's smaller screen doesn't cause scrolling.

  • editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r254435 r254437  
     12020-01-13  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [iOS] editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html times out
     4        https://bugs.webkit.org/show_bug.cgi?id=206126
     5        <rdar://problem/58060387>
     6
     7        Reviewed by Tim Horton.
     8
     9        This test is intended to verify that when ranged selection UI covers up most of the view, tapping the selection
     10        will clear the selection instead of toggling the callout bar. However, there are a couple of issues that make
     11        this test fail:
     12
     13        - The long press that is intended to select text ends up under the "Sel" in select and above the "ect" that
     14        wraps to the next line, which causes the word to not be selected. To fix this, I changed the tap location from
     15        the center of the view to somewhere in the top half of the view, near the middle of "Sel".
     16
     17        - The callout bar appears in the center of the screen with the "Look up" action in the middle, so tapping the
     18        center of the view again causes a view controller to be presented when looking up the selected word ("Select").
     19        We can avoid this by also moving the tap location away from the center of the view.
     20
     21        - On iPad, the word "Select" isn't big enough to encompass most of the screen even at 250px, so the test fails.
     22        We fix this by making the "Select" text much bigger (500px), and then make the body `overflow: hidden` so that
     23        selecting the word on iPhone's smaller screen doesn't cause scrolling.
     24
     25        * editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html:
     26
    1272020-01-13  Truitt Savell  <tsavell@apple.com>
    228
  • trunk/LayoutTests/editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html

    r252496 r254437  
    1111    height: 100%;
    1212    margin: 0;
     13    overflow: hidden;
    1314}
    1415
    1516#text {
    16     font-size: 250px;
     17    font-size: 500px;
    1718    margin-top: 0;
    1819    word-wrap: break-word;
     
    2728    const text = document.getElementById("text");
    2829
    29     await UIHelper.longPressElement(text);
     30    await UIHelper.longPressAtPoint(160, 150);
    3031    await UIHelper.waitForSelectionToAppear();
    3132    testPassed("Observed selection.");
    3233
    3334    await UIHelper.waitForDoubleTapDelay();
    34     await UIHelper.activateElement(text);
     35    await UIHelper.activateAt(160, 150);
    3536    await UIHelper.waitForSelectionToDisappear();
    3637    testPassed("Dismissed selection.");
Note: See TracChangeset for help on using the changeset viewer.