anchor.diff:      expect(iwVisibleStatus, false);
   
       await controller.showMarkerInfoWindow(marker.markerId);
  -    iwVisibleStatus = await controller.isMarkerInfoWindowShown(marker.markerId);
  +    // The Maps SDK doesn't always return true for whether it is shown
  +    // immediately after showing it, so wait for it to report as shown.
  +    iwVisibleStatus = await waitForValueMatchingPredicate<bool>(
  +            tester,
  +            () => controller.isMarkerInfoWindowShown(marker.markerId),
  +            (bool visible) => visible) ??
  +        false;
       expect(iwVisibleStatus, true);
   
       await controller.hideMarkerInfoWindow(marker.markerId);
  
positive.code:     final LatLngBounds secondVisibleRegion =
          await mapController.getVisibleRegion();
  
      expect(secondVisibleRegion, isNotNull);
      expect(secondVisibleRegion.southwest, isNotNull);
      expect(secondVisibleRegion.northeast, isNotNull);
      expect(secondVisibleRegion, isNot(zeroLatLngBounds));
  
      expect(firstVisibleRegion, isNot(secondVisibleRegion));
  
negative.code: void main() {
    IntegrationTestWidgetsFlutterBinding.ensureInitialized();
    GoogleMapsFlutterPlatform.instance.enableDebugInspection();
  
    // Repeatedly checks an asynchronous value against a test condition, waiting
    // one frame between each check, returing the value if it passes the predicate
    // before [maxTries] is reached.
    //
    // Returns null if the predicate is never satisfied.
    //
    // This is useful for cases where the Maps SDK has some internally
    // asynchronous operation that we don't have visibility into (e.g., native UI
    // animations).
    Future<T?> waitForValueMatchingPredicate<T>(WidgetTester tester,
        Future<T> Function() getValue, bool Function(T) predicate,
        {int maxTries = 100}) async {
      for (int i = 0; i < maxTries; i++) {
        final T value = await getValue();
        if (predicate(value)) {
          return value;
        }
        await tester.pump();
      }
      return null;
    }
  
    testWidgets('testCompassToggle', (WidgetTester tester) async {
      final Key key = GlobalKey();
  