[ios] Stops checking for a presentedVC on AR and Store Kit presentations.

Due to https://crbug.com/965688 we need to dismiss the InfobarBanner
before presenting a new ViewController.

Most Coordinators present without checking if baseVC is already
presenting another VC (Even some where web is triggering the presentation,
like PassKitCoordinator).

Before this CL the VC's trying to be presented will NO-OP if a VC is already
presented.
This CL stops checking if baseVC is presenting so it lets BVC decide if it
should present or not (BVC will dismiss any InfobarBanner before presenting
any other VC).

This means that if an InfobarBanner is being presented
this will no longer NO-OP. It will dismiss the InfobarBanner first and then
present StoreKit or ARQuickLook.

In order to make sure that we don't re-present a ViewController again, the
properties are now weak so a failed presentation (meaning they are not part
of the view hierarchy) will set the ViewController property to nil.

StoreKitCoordinatorTest now uses a real UIViewController since
FakeUIViewController presentedViewController doesn't behave as a
UIViewController, meaning that if we present a VC on top of an already
presented VC the new VC gets presented, which shouldn't happen.


Bug: 911864
Change-Id: I15f8d5b4a7f866295fece58423fde8c59ec97e7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1623497
Reviewed-by: Mohammad Refaat <mrefaat@chromium.org>
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Peter Lee <pkl@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663068}
3 files changed