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

Unified Diff: chrome/browser/sync/test/integration/two_client_password_manager_setting_migrator_service_sync_test.cc

Issue 2379433002: [Sync] Refactoring of sync integration test checkers to remove boilerplate await methods. (Closed)
Patch Set: Rebase Created 4 years, 2 months 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: chrome/browser/sync/test/integration/two_client_password_manager_setting_migrator_service_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/two_client_password_manager_setting_migrator_service_sync_test.cc b/chrome/browser/sync/test/integration/two_client_password_manager_setting_migrator_service_sync_test.cc
index d1179bcb54862b7b678a80798ab2535bef022f0f..f4c6d53296d71227bff0a04fdd26d455e4a7f7a5 100644
--- a/chrome/browser/sync/test/integration/two_client_password_manager_setting_migrator_service_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_password_manager_setting_migrator_service_sync_test.cc
@@ -15,7 +15,6 @@
#include "content/public/test/test_browser_thread_bundle.h"
using password_manager_setting_migrater_helper::ExpectPrefValuesOnClient;
-using preferences_helper::AwaitBooleanPrefMatches;
using preferences_helper::GetPrefs;
using password_manager::prefs::kPasswordManagerSavingEnabled;
using password_manager::prefs::kCredentialsEnableService;
@@ -38,13 +37,13 @@ class TwoClientsPasswordManagerSettingMigratorServiceSyncTest
// Changes the |pref_name| preference value on the client with |index| and
// checks that the value is the same on both clients after the change.
void TestPrefChangeOnClient(int index, const char* pref_name) {
- ASSERT_TRUE(AwaitBooleanPrefMatches(kPasswordManagerSavingEnabled));
- ASSERT_TRUE(AwaitBooleanPrefMatches(kCredentialsEnableService));
+ ASSERT_TRUE(BooleanPrefMatchChecker(kPasswordManagerSavingEnabled).Wait());
+ ASSERT_TRUE(BooleanPrefMatchChecker(kCredentialsEnableService).Wait());
preferences_helper::ChangeBooleanPref(index, pref_name);
// Check that changed pref has the same value on both clients
- ASSERT_TRUE(AwaitBooleanPrefMatches(kPasswordManagerSavingEnabled));
- ASSERT_TRUE(AwaitBooleanPrefMatches(kCredentialsEnableService));
+ ASSERT_TRUE(BooleanPrefMatchChecker(kPasswordManagerSavingEnabled).Wait());
+ ASSERT_TRUE(BooleanPrefMatchChecker(kCredentialsEnableService).Wait());
}
void EnsureMigrationStartsForClient(int index) {
@@ -117,6 +116,6 @@ IN_PROC_BROWSER_TEST_F(
ASSERT_TRUE(SetupSync());
EnsureMigrationStartsForClient(0);
TestPrefChangeOnClient(1, kCredentialsEnableService);
- ASSERT_TRUE(AwaitBooleanPrefMatches(kPasswordManagerSavingEnabled));
+ ASSERT_TRUE(BooleanPrefMatchChecker(kPasswordManagerSavingEnabled).Wait());
ExpectValueOnBothClientsForBothPreference(false);
}

Powered by Google App Engine
This is Rietveld 408576698