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

Unified Diff: chrome/browser/sync/test/integration/performance/autofill_sync_perf_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/performance/autofill_sync_perf_test.cc
diff --git a/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
index b89f270b0bd03d5d5fcdb2bd6f61b68773b0f052..6933225d9087c25f3046004b4b8962aed2fe2d36 100644
--- a/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
@@ -19,7 +19,6 @@
using autofill::ServerFieldType;
using autofill::AutofillKey;
using autofill::AutofillProfile;
-
using autofill_helper::AllProfilesMatch;
using autofill_helper::GetAllAutoFillProfiles;
using autofill_helper::GetAllKeys;
@@ -27,6 +26,8 @@ using autofill_helper::GetKeyCount;
using autofill_helper::GetProfileCount;
using autofill_helper::RemoveKeys;
using autofill_helper::SetProfiles;
+using sync_timing_helper::PrintResult;
+using sync_timing_helper::TimeMutualSyncCycle;
// See comments in typed_urls_sync_perf_test.cc for reasons for these
// magic numbers.
@@ -175,22 +176,21 @@ IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, AutofillProfiles_P0) {
// TCM ID - 7557873.
AddProfiles(0, kNumProfiles);
- base::TimeDelta dt =
- SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ base::TimeDelta dt = TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(kNumProfiles, GetProfileCount(1));
- SyncTimingHelper::PrintResult("autofill", "add_autofill_profiles", dt);
+ PrintResult("autofill", "add_autofill_profiles", dt);
// TCM ID - 7549835.
UpdateProfiles(0);
- dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ dt = TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(kNumProfiles, GetProfileCount(1));
- SyncTimingHelper::PrintResult("autofill", "update_autofill_profiles", dt);
+ PrintResult("autofill", "update_autofill_profiles", dt);
// TCM ID - 7553678.
RemoveProfiles(0);
- dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ dt = TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0, GetProfileCount(1));
- SyncTimingHelper::PrintResult("autofill", "delete_autofill_profiles", dt);
+ PrintResult("autofill", "delete_autofill_profiles", dt);
}
IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, Autofill_P0) {
@@ -199,15 +199,14 @@ IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, Autofill_P0) {
AddKeys(0, kNumKeys);
// TODO(lipalani): fix this. The following line is added to force sync.
ForceSync(0);
- base::TimeDelta dt =
- SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ base::TimeDelta dt = TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(kNumKeys, GetKeyCount(1));
- SyncTimingHelper::PrintResult("autofill", "add_autofill_keys", dt);
+ PrintResult("autofill", "add_autofill_keys", dt);
RemoveKeys(0);
// TODO(lipalani): fix this. The following line is added to force sync.
ForceSync(0);
- dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ dt = TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0, GetKeyCount(1));
- SyncTimingHelper::PrintResult("autofill", "delete_autofill_keys", dt);
+ PrintResult("autofill", "delete_autofill_keys", dt);
}

Powered by Google App Engine
This is Rietveld 408576698