• Toni Barzic's avatar
    Fix flakiness in ShutdownPolicyLoginTest · 456f478a
    Toni Barzic authored
    The test updates shutdown policy, and waits for the login shelf UI to
    get updated from the state before the policy was changed. It then
    verifies that the shutdown/restart button visibility has been updated.
    
    This is racy if login shelf state can change for any reason different
    than shutdown policy value - which started happening since the test was
    updated to properly set-up enrollment, OOBE complete state. The login
    UI lands on login screen with GAIA dialog, instead of welcome screen,
    and GAIA UI is trying to update guest login button visibility.
    
    This fixes the test to wait for the shutdown button visibility to
    change. It observes login shelf UI updates until it detects that the
    shutdown button has the desired visibility state.
    
    Does the smae for lock test, even though that one does not seem flaky
    for now.
    
    Change-Id: I4b61c17c2ef750b9850bbbe68ea406b15197ec81
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1608525Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Toni Baržić <tbarzic@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#659074}
    456f478a
shutdown_policy_browsertest.cc 10.1 KB