• nancy's avatar
    Fix the unit tests error in ASAN bots. · b4de19b4
    nancy authored
    This CL is used to fix the two unit tests in ASAN bots:
    
    The reason is when the window is closed, the item controller is not
    removed, because it can't find the app type from AppService. When the
    unit test exits, the window is deleted, then the item controller is
    removed, which accesses the removed window.
    
    Update extension_apps to SetWindowOwner when OnAppWindowAdded,
    otherwise MultiUserWindowManagerHelper::ShowWindowForUser could fail
    at ui side, because no owner for the window.
    
    Update the OnInstances to find the corrent proxy, which might has the
    instance info, because the window coud be teleported to from the
    inactive user to the active user, but the instance should still be saved
    in the inactive user's InstanceRegistry.
    
    Add kHidden state to avoid reusing kStarted state.
    
    BUG=1036648
    
    Change-Id: I40b494dcf9fa5ea6febf29dad90150b51096e3d1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978342Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#727931}
    b4de19b4
extension_apps.cc 43.9 KB