• sczs's avatar
    [ios] Creates InfobarContainerCoordinator unittests. · dfafd36d
    sczs authored
    This CL also makes some improvements to InfobarContainerCoordinator so
    the test can pass:
    - isPresentingInfobarBanner is now directly based on the ChildCoordinator
    Banner presentation and not just the existence of a VC.
    - A disconnect method is added to make sure the mediator stops observing
    WebStateList before being dealloced (This is a common pattern throughout
    mediators since the memory de-alloaction order in unittest can cause this)
    - Adds a legacyContainerFullscrenSupportDisabled to disable FullScreen
    support in the legacyContainer. This is needed to avoid a crash after
    cleaning up each test case, in order to properly fix this we'd need to
    know when the legacyContainer has been dismissed, that would require
    some refactoring and the effort/risk is not worth it at this point.
    - Removes a DCHECK in the legacyContainer since now the count of total
    Infobars doesn't necessarily match the count of total Infobars in the
    legacy Container. This because one of them can be a message. The iOS
    implementation of the container was merely sending infobar.count() for
    position, meaning we were never using position anyways.
    
    Bug: 911864
    Change-Id: Ie46c9dc88d2f5277401eb1d08aa54a09d4dbaf82
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566756
    Commit-Queue: Sergio Collazos <sczs@chromium.org>
    Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
    Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#652604}
    dfafd36d
BUILD.gn 3.98 KB