• Dominique Fauteux-Chapleau's avatar
    Reland "Add browser tests for DeepScanningDialogDelegate" · ade55632
    Dominique Fauteux-Chapleau authored
    This is a reland of 28640451
    
    I was able to reproduce the issue on my Mac machine.
    The reason for the failure was that the implementation of
    WebContentsDestroyed was too naive, the intent of calling "delete this"
    was to make the dialog go away without calling the "Cancel" callback.
    This is now achieved by deleting the delegate first and updating
    CancelButtonCallback so it becomes a no-op in this case (check diff
    between Patchset 1 and 2 to see this fix).
    
    Original change's description:
    > Add browser tests for DeepScanningDialogDelegate
    >
    > These tests use the least possible amount of overrides to ensure
    > DeepScanningDialogDelegate every requests/callbacks eventually resolves
    > and returns to the caller.
    >
    > Also add code to handle the web contents being destroyed and avoid ASAN
    > issues.
    >
    > Bug: 1041890
    > Change-Id: Ibfe232354f0591ae9e854bf5a0163ede68d6faf9
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083598
    > Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
    > Reviewed-by: Daniel Rubery <drubery@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#747713}
    
    Bug: 1041890
    Change-Id: Ie3042b0703077c20fc778450a7863ba9f26c8efc
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091217Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
    Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#748297}
    ade55632
BUILD.gn 352 KB