summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 18:58:22 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 18:58:22 +0000
commit66aa024583499d3d9dcea971900817e65b3cb052 (patch)
tree2304e84e97c44fc0aec6c06df3a549a6082e5b1e
parentf01adb82784f26a4dc6dbd569c3599657238656f (diff)
downloadchromium_src-66aa024583499d3d9dcea971900817e65b3cb052.zip
chromium_src-66aa024583499d3d9dcea971900817e65b3cb052.tar.gz
chromium_src-66aa024583499d3d9dcea971900817e65b3cb052.tar.bz2
Satisfy invariant that a PasswordForm's signon-realm is a prefix of its origin
src\webkit\glue\password_form.h requires that its signon-realm field is a prefix of its origin field. This patch updates LivePasswordsSyncTest::CreateTestPasswordForm so that it now follows the invariant. This should fix the test failures we were seeing in the racy tests that simultaneously added password forms to two clients and wondered why one of them was missing after sync. BUG=77993 TEST=sync_integration_tests Review URL: http://codereview.chromium.org/7229003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90063 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/live_sync/live_passwords_sync_test.cc4
-rw-r--r--chrome/test/live_sync/multiple_client_live_passwords_sync_test.cc3
2 files changed, 3 insertions, 4 deletions
diff --git a/chrome/test/live_sync/live_passwords_sync_test.cc b/chrome/test/live_sync/live_passwords_sync_test.cc
index 2235ccb..001b726 100644
--- a/chrome/test/live_sync/live_passwords_sync_test.cc
+++ b/chrome/test/live_sync/live_passwords_sync_test.cc
@@ -17,6 +17,7 @@
using webkit_glue::PasswordForm;
const std::string kFakeSignonRealm = "http://fake-signon-realm.google.com/";
+const char* kIndexedFakeOrigin = "http://fake-signon-realm.google.com/%d";
// We use a WaitableEvent to wait when logins are added, removed, or updated
// instead of running the UI message loop because of a restriction that
@@ -185,8 +186,7 @@ int LivePasswordsSyncTest::GetVerifierPasswordCount() {
PasswordForm LivePasswordsSyncTest::CreateTestPasswordForm(int index) {
PasswordForm form;
form.signon_realm = kFakeSignonRealm;
- form.origin =
- GURL(base::StringPrintf("http://fake-domain%d.google.com/", index));
+ form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index));
form.username_value = ASCIIToUTF16(base::StringPrintf("username%d", index));
form.password_value = ASCIIToUTF16(base::StringPrintf("password%d", index));
return form;
diff --git a/chrome/test/live_sync/multiple_client_live_passwords_sync_test.cc b/chrome/test/live_sync/multiple_client_live_passwords_sync_test.cc
index 0f28d4f..8aeb9f4 100644
--- a/chrome/test/live_sync/multiple_client_live_passwords_sync_test.cc
+++ b/chrome/test/live_sync/multiple_client_live_passwords_sync_test.cc
@@ -9,8 +9,7 @@
using webkit_glue::PasswordForm;
-// TODO(rsimha): This test fails intermittently -- see http://crbug.com/77993.
-IN_PROC_BROWSER_TEST_F(MultipleClientLivePasswordsSyncTest, FAILS_Sanity) {
+IN_PROC_BROWSER_TEST_F(MultipleClientLivePasswordsSyncTest, Sanity) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
for (int i = 0; i < num_clients(); ++i) {