Index: ios/chrome/browser/ui/settings/settings_egtest.mm |
diff --git a/ios/chrome/browser/ui/settings/settings_egtest.mm b/ios/chrome/browser/ui/settings/settings_egtest.mm |
index 6a5d36deb6b339e8f657626dac6284c139875eb4..cff3d839115ce09fc47ed2844c88c06014a6a47d 100644 |
--- a/ios/chrome/browser/ui/settings/settings_egtest.mm |
+++ b/ios/chrome/browser/ui/settings/settings_egtest.mm |
@@ -593,10 +593,12 @@ bool IsCertificateCleared() { |
// Set the network to use a cellular network, which should disable uploading |
// when the wifi-only flag is set. |
chrome_test_util::SetWWANStateTo(YES); |
+ [[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; |
[self assertMetricsServiceEnabledButNotUploading:serviceType]; |
// Turn off cellular network usage, which should enable uploading. |
chrome_test_util::SetWWANStateTo(NO); |
+ [[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; |
[self assertMetricsServiceEnabled:serviceType]; |
// kMetricsReportingEnabled ON and kMetricsReportingWifiOnly OFF |