• Yuke Liao's avatar
    Reland"Add AX ID for Cancel and Done button on Translate Language Picker." · be3e31b7
    Yuke Liao authored
    This reverts commit 6163e501.
    
    The original CL's test fails on iPhone 5s, iOS 9.0 because the 
    accessibility identifiers of the buttons are not set even though 
    setAccessibilityIdentifier is called explicitly in the code, and it
    looks like there is nothing we can do about it. This CL fixes the issue
    by keeping using accessbilityLabel on iOS 9 and iOS 10, and switch to
    use accessibilityID on iOS 11, and will clean this code up once the
    support for iOS 10 is dropped.
    
    Original change's description:
    > Add AX ID for Cancel and Done button on Translate Language Picker.
    > 
    > Currently, the test uses the following matchers to find the cancel and
    > done button on language picker:
    > 
    > grey_allOf(chrome_test_util::ButtonWithAccessibilityLabel(@"Cancel"),
    >                     grey_userInteractionEnabled(), nil);
    > 
    > This is not bullet proof and may break any time, and this CL fixes the
    > issue by adding AX ID to both the cancel and done buttons.
    
    Bug: 750344
    Change-Id: I57d1c716118049516d93853da77c25d85385aae0
    Reviewed-on: https://chromium-review.googlesource.com/599124
    Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
    Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#491774}
    be3e31b7
translate_egtest.mm 36 KB