You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@
14
14
15
15
importandroid.content.Context;
16
16
importandroid.os.Build;
17
+
importandroid.os.Looper;
17
18
importandroidx.activity.ComponentActivity;
18
19
importandroidx.test.core.app.ApplicationProvider;
19
20
importcom.google.android.gms.maps.GoogleMap;
@@ -32,6 +33,7 @@
32
33
importorg.mockito.MockitoAnnotations;
33
34
importorg.robolectric.Robolectric;
34
35
importorg.robolectric.RobolectricTestRunner;
36
+
importorg.robolectric.Shadows;
35
37
importorg.robolectric.annotation.Config;
36
38
37
39
@RunWith(RobolectricTestRunner.class)
@@ -118,6 +120,7 @@ public void InvalidateMapAfterMethodCalls() throws InterruptedException {
118
120
119
121
verify(mapView, never()).invalidate();
120
122
argument.getValue().onMapLoaded();
123
+
Shadows.shadowOf(Looper.getMainLooper()).idle();
121
124
verify(mapView).invalidate();
122
125
}
123
126
}
@@ -141,6 +144,7 @@ public void InvalidateMapOnceAfterMethodCall() throws InterruptedException {
0 commit comments