Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller_unittest.mm

Issue 2592173002: Fix ios_chrome_unittests to crash on DCHECK failure. (Closed)
Patch Set: Address comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller_unittest.mm b/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller_unittest.mm
index 4141ad4a483a96a83e5e5a1a44a38ad57ded900c..fedc6423fe6fe4c5834c4011afb22cdcab0f13f1 100644
--- a/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller_unittest.mm
@@ -17,6 +17,7 @@
#include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
#include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
#import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
+#include "ios/chrome/browser/ui/settings/personal_data_manager_data_changed_observer.h"
#include "ios/web/public/test/test_web_thread_bundle.h"
#include "testing/platform_test.h"
@@ -55,6 +56,7 @@ class AutofillProfileEditCollectionViewControllerTest : public PlatformTest {
personal_data_manager_ =
autofill::PersonalDataManagerFactory::GetForBrowserState(
chrome_browser_state_.get());
+ PersonalDataManagerDataChangedObserver observer(personal_data_manager_);
std::string guid = base::GenerateGUID();
@@ -67,6 +69,7 @@ class AutofillProfileEditCollectionViewControllerTest : public PlatformTest {
base::UTF8ToUTF16(kTestAddressLine1));
personal_data_manager_->SaveImportedProfile(autofill_profile);
+ observer.Wait(); // Wait for the completion of the asynchronous operation.
autofill_profile_edit_controller_.reset(
[[AutofillProfileEditCollectionViewController

Powered by Google App Engine
This is Rietveld 408576698