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

Side by Side Diff: chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at detecting errors Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/autofill/autofill_profile.h" 6 #include "chrome/browser/autofill/autofill_profile.h"
7 #include "chrome/browser/sync/profile_sync_service_harness.h" 7 #include "chrome/browser/sync/profile_sync_service_harness.h"
8 #include "chrome/browser/sync/test/integration/autofill_helper.h" 8 #include "chrome/browser/sync/test/integration/autofill_helper.h"
9 #include "chrome/browser/sync/test/integration/sync_test.h" 9 #include "chrome/browser/sync/test/integration/sync_test.h"
10 #include "chrome/browser/webdata/autofill_entry.h" 10 #include "chrome/browser/webdata/autofill_entry.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, DisableSync) { 327 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, DisableSync) {
328 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 328 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
329 329
330 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); 330 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER));
331 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 331 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
332 ASSERT_TRUE(ProfilesMatch(0, 1)); 332 ASSERT_TRUE(ProfilesMatch(0, 1));
333 ASSERT_EQ(1U, GetAllProfiles(0).size()); 333 ASSERT_EQ(1U, GetAllProfiles(0).size());
334 334
335 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes()); 335 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes());
336 AddProfile(0, CreateAutofillProfile(PROFILE_FRASIER)); 336 AddProfile(0, CreateAutofillProfile(PROFILE_FRASIER));
337 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Added a profile.")); 337 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Added a profile."));
338 ASSERT_FALSE(ProfilesMatch(0, 1)); 338 ASSERT_FALSE(ProfilesMatch(0, 1));
339 ASSERT_EQ(2U, GetAllProfiles(0).size()); 339 ASSERT_EQ(2U, GetAllProfiles(0).size());
340 ASSERT_EQ(1U, GetAllProfiles(1).size()); 340 ASSERT_EQ(1U, GetAllProfiles(1).size());
341 341
342 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); 342 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes());
343 ASSERT_TRUE(AwaitQuiescence()); 343 ASSERT_TRUE(AwaitQuiescence());
344 ASSERT_TRUE(ProfilesMatch(0, 1)); 344 ASSERT_TRUE(ProfilesMatch(0, 1));
345 ASSERT_EQ(2U, GetAllProfiles(0).size()); 345 ASSERT_EQ(2U, GetAllProfiles(0).size());
346 } 346 }
347 347
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 AutofillType(EMAIL_ADDRESS), 400 AutofillType(EMAIL_ADDRESS),
401 exceeds_max_length_string); 401 exceeds_max_length_string);
402 UpdateProfile(0, 402 UpdateProfile(0,
403 GetAllProfiles(0)[0]->guid(), 403 GetAllProfiles(0)[0]->guid(),
404 AutofillType(ADDRESS_HOME_LINE1), 404 AutofillType(ADDRESS_HOME_LINE1),
405 exceeds_max_length_string); 405 exceeds_max_length_string);
406 406
407 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 407 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
408 ASSERT_FALSE(ProfilesMatch(0, 1)); 408 ASSERT_FALSE(ProfilesMatch(0, 1));
409 } 409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698