[ios] Creates InfobarContainerCoordinator unittests.
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:Peter Lee <pkl@chromium.org> Reviewed-by:
Chris Lu <thegreenfrog@chromium.org> Cr-Commit-Position: refs/heads/master@{#652604}
Showing
This diff is collapsed.
Please register or sign in to comment