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

Unified Diff: chrome/test/live_sync/perf/passwords_sync_perf_test.cc

Issue 7376001: Move sync performance tests into new target (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 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/test/live_sync/perf/passwords_sync_perf_test.cc
diff --git a/chrome/test/live_sync/performance_live_passwords_sync_test.cc b/chrome/test/live_sync/perf/passwords_sync_perf_test.cc
similarity index 84%
rename from chrome/test/live_sync/performance_live_passwords_sync_test.cc
rename to chrome/test/live_sync/perf/passwords_sync_perf_test.cc
index 05aae472947f4cf985668051337393d30af69e81..15f5a7825486a9ad17c1e1057e751d12c49aacdc 100644
--- a/chrome/test/live_sync/performance_live_passwords_sync_test.cc
+++ b/chrome/test/live_sync/perf/passwords_sync_perf_test.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
#include "chrome/test/live_sync/live_passwords_sync_test.h"
-#include "chrome/test/live_sync/live_sync_timing_helper.h"
+#include "chrome/test/live_sync/perf/live_sync_timing_helper.h"
static const int kNumPasswords = 150;
@@ -18,10 +18,10 @@ static const int kBenchmarkPoints[] = {1, 10, 20, 30, 40, 50, 75, 100, 125,
// TODO(braffert): Move this class into its own .h/.cc files. What should the
// class files be named as opposed to the file containing the tests themselves?
-class PerformanceLivePasswordsSyncTest
+class PasswordsSyncPerfTest
: public TwoClientLivePasswordsSyncTest {
public:
- PerformanceLivePasswordsSyncTest() : password_number_(0) {}
+ PasswordsSyncPerfTest() : password_number_(0) {}
// Adds |num_logins| new unique passwords to |profile|.
void AddLogins(int profile, int num_logins);
@@ -43,16 +43,16 @@ class PerformanceLivePasswordsSyncTest
std::string NextPassword();
int password_number_;
- DISALLOW_COPY_AND_ASSIGN(PerformanceLivePasswordsSyncTest);
+ DISALLOW_COPY_AND_ASSIGN(PasswordsSyncPerfTest);
};
-void PerformanceLivePasswordsSyncTest::AddLogins(int profile, int num_logins) {
+void PasswordsSyncPerfTest::AddLogins(int profile, int num_logins) {
for (int i = 0; i < num_logins; ++i) {
AddLogin(GetPasswordStore(profile), NextLogin());
}
}
-void PerformanceLivePasswordsSyncTest::UpdateLogins(int profile) {
+void PasswordsSyncPerfTest::UpdateLogins(int profile) {
std::vector<webkit_glue::PasswordForm> logins;
GetLogins(GetPasswordStore(profile), logins);
for (std::vector<webkit_glue::PasswordForm>::iterator it = logins.begin();
@@ -62,11 +62,11 @@ void PerformanceLivePasswordsSyncTest::UpdateLogins(int profile) {
}
}
-void PerformanceLivePasswordsSyncTest::RemoveLogins(int profile) {
+void PasswordsSyncPerfTest::RemoveLogins(int profile) {
LivePasswordsSyncTest::RemoveLogins(GetPasswordStore(profile));
}
-void PerformanceLivePasswordsSyncTest::Cleanup() {
+void PasswordsSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveLogins(i);
}
@@ -75,16 +75,16 @@ void PerformanceLivePasswordsSyncTest::Cleanup() {
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
}
-webkit_glue::PasswordForm PerformanceLivePasswordsSyncTest::NextLogin() {
+webkit_glue::PasswordForm PasswordsSyncPerfTest::NextLogin() {
return CreateTestPasswordForm(password_number_++);
}
-std::string PerformanceLivePasswordsSyncTest::NextPassword() {
+std::string PasswordsSyncPerfTest::NextPassword() {
return base::StringPrintf("password%d", password_number_++);
}
// TCM ID - 7567749.
-IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Add) {
+IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, Add) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddLogins(0, kNumPasswords);
@@ -98,7 +98,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Add) {
}
// TCM ID - 7365093.
-IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Update) {
+IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, Update) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddLogins(0, kNumPasswords);
@@ -115,7 +115,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Update) {
}
// TCM ID - 7557852.
-IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Delete) {
+IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, Delete) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddLogins(0, kNumPasswords);
@@ -131,7 +131,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Delete) {
VLOG(0) << std::endl << "dt: " << dt.InSecondsF() << " s";
}
-IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, DISABLED_Benchmark) {
+IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, DISABLED_Benchmark) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
for (int i = 0; i < kNumBenchmarkPoints; ++i) {

Powered by Google App Engine
This is Rietveld 408576698