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

Side by Side Diff: chrome/test/live_sync/two_client_live_passwords_sync_test.cc

Issue 6826007: Mark some sync tests as flaky. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 8 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
« no previous file with comments | « chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/password_manager/password_form_data.h" 6 #include "chrome/browser/password_manager/password_form_data.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/sessions/session_state.h" 8 #include "chrome/browser/sync/sessions/session_state.h"
9 #include "chrome/test/live_sync/live_passwords_sync_test.h" 9 #include "chrome/test/live_sync/live_passwords_sync_test.h"
10 10
11 using webkit_glue::PasswordForm; 11 using webkit_glue::PasswordForm;
12 12
13 static const char* kValidPassphrase = "passphrase!"; 13 static const char* kValidPassphrase = "passphrase!";
14 14
15 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, Add) { 15 // TODO(rsimha): See http://crbug.com/78840.
16 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, FLAKY_Add) {
16 17
17 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 18 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
18 19
19 PasswordForm form = CreateTestPasswordForm(0); 20 PasswordForm form = CreateTestPasswordForm(0);
20 AddLogin(GetVerifierPasswordStore(), form); 21 AddLogin(GetVerifierPasswordStore(), form);
21 AddLogin(GetPasswordStore(0), form); 22 AddLogin(GetPasswordStore(0), form);
22 23
23 std::vector<PasswordForm> verifier_forms; 24 std::vector<PasswordForm> verifier_forms;
24 GetLogins(GetVerifierPasswordStore(), verifier_forms); 25 GetLogins(GetVerifierPasswordStore(), verifier_forms);
25 ASSERT_EQ(1U, verifier_forms.size()); 26 ASSERT_EQ(1U, verifier_forms.size());
26 27
27 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 28 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
28 29
29 std::vector<PasswordForm> forms0; 30 std::vector<PasswordForm> forms0;
30 GetLogins(GetPasswordStore(0), forms0); 31 GetLogins(GetPasswordStore(0), forms0);
31 ASSERT_TRUE(ContainsSamePasswordForms(verifier_forms, forms0)); 32 ASSERT_TRUE(ContainsSamePasswordForms(verifier_forms, forms0));
32 33
33 std::vector<PasswordForm> forms1; 34 std::vector<PasswordForm> forms1;
34 GetLogins(GetPasswordStore(1), forms1); 35 GetLogins(GetPasswordStore(1), forms1);
35 ASSERT_TRUE(ContainsSamePasswordForms(verifier_forms, forms1)); 36 ASSERT_TRUE(ContainsSamePasswordForms(verifier_forms, forms1));
36 } 37 }
37 38
38 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, Race) { 39 // TODO(rsimha): See http://crbug.com/78840.
40 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, FLAKY_Race) {
39 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 41 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
40 42
41 PasswordForm form0 = CreateTestPasswordForm(0); 43 PasswordForm form0 = CreateTestPasswordForm(0);
42 AddLogin(GetPasswordStore(0), form0); 44 AddLogin(GetPasswordStore(0), form0);
43 45
44 PasswordForm form1 = form0; 46 PasswordForm form1 = form0;
45 form1.password_value = ASCIIToUTF16("password1"); 47 form1.password_value = ASCIIToUTF16("password1");
46 AddLogin(GetPasswordStore(1), form1); 48 AddLogin(GetPasswordStore(1), form1);
47 49
48 ASSERT_TRUE(AwaitQuiescence()); 50 ASSERT_TRUE(AwaitQuiescence());
49 51
50 std::vector<PasswordForm> forms0; 52 std::vector<PasswordForm> forms0;
51 GetLogins(GetPasswordStore(0), forms0); 53 GetLogins(GetPasswordStore(0), forms0);
52 ASSERT_EQ(1U, forms0.size()); 54 ASSERT_EQ(1U, forms0.size());
53 55
54 std::vector<PasswordForm> forms1; 56 std::vector<PasswordForm> forms1;
55 GetLogins(GetPasswordStore(1), forms1); 57 GetLogins(GetPasswordStore(1), forms1);
56 ASSERT_EQ(1U, forms1.size()); 58 ASSERT_EQ(1U, forms1.size());
57 59
58 ASSERT_TRUE(ContainsSamePasswordForms(forms0, forms1)); 60 ASSERT_TRUE(ContainsSamePasswordForms(forms0, forms1));
59 } 61 }
60 62
61 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, SetPassphrase) { 63 // TODO(rsimha): See http://crbug.com/78840.
64 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, FLAKY_SetPassphrase) {
62 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 65 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
63 66
64 SetPassphrase(0, kValidPassphrase, true); 67 SetPassphrase(0, kValidPassphrase, true);
65 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 68 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
66 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 69 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
67 70
68 SetPassphrase(1, kValidPassphrase, false); 71 SetPassphrase(1, kValidPassphrase, false);
69 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 72 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
70 } 73 }
71 74
75 // TODO(rsimha): See http://crbug.com/78840.
72 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, 76 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
73 SetPassphraseAndAddPassword) { 77 FLAKY_SetPassphraseAndAddPassword) {
74 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 78 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
75 79
76 SetPassphrase(0, kValidPassphrase, true); 80 SetPassphrase(0, kValidPassphrase, true);
77 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 81 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
78 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 82 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
79 83
80 SetPassphrase(1, kValidPassphrase, false); 84 SetPassphrase(1, kValidPassphrase, false);
81 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 85 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
82 86
83 PasswordForm form = CreateTestPasswordForm(0); 87 PasswordForm form = CreateTestPasswordForm(0);
84 AddLogin(GetPasswordStore(0), form); 88 AddLogin(GetPasswordStore(0), form);
85 89
86 std::vector<PasswordForm> forms0; 90 std::vector<PasswordForm> forms0;
87 GetLogins(GetPasswordStore(0), forms0); 91 GetLogins(GetPasswordStore(0), forms0);
88 ASSERT_EQ(1U, forms0.size()); 92 ASSERT_EQ(1U, forms0.size());
89 93
90 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 94 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
91 95
92 std::vector<PasswordForm> forms1; 96 std::vector<PasswordForm> forms1;
93 GetLogins(GetPasswordStore(1), forms1); 97 GetLogins(GetPasswordStore(1), forms1);
94 ASSERT_EQ(1U, forms1.size()); 98 ASSERT_EQ(1U, forms1.size());
95 } 99 }
96 100
97 // TODO(rsimha): This test fails occasionally -- see http://crbug.com/77956. 101 // TODO(rsimha): See http://crbug.com/78840.
98 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, 102 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
99 FAILS_SetPassphraseAndThenSetupSync) { 103 FLAKY_SetPassphraseAndThenSetupSync) {
100 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; 104 ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
101 105
102 ASSERT_TRUE(GetClient(0)->SetupSync()); 106 ASSERT_TRUE(GetClient(0)->SetupSync());
103 SetPassphrase(0, kValidPassphrase, true); 107 SetPassphrase(0, kValidPassphrase, true);
104 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 108 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
105 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Initial sync.")); 109 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Initial sync."));
106 110
107 SetPassphrase(1, kValidPassphrase, false); 111 SetPassphrase(1, kValidPassphrase, false);
108 ASSERT_TRUE(GetClient(1)->SetupSync()); 112 ASSERT_TRUE(GetClient(1)->SetupSync());
109 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 113 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
110 } 114 }
111 115
112 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, SetPassphraseTwice) { 116 // TODO(rsimha): See http://crbug.com/78840.
117 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
118 FLAKY_SetPassphraseTwice) {
113 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 119 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
114 120
115 SetPassphrase(0, kValidPassphrase, true); 121 SetPassphrase(0, kValidPassphrase, true);
116 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 122 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
117 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 123 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
118 124
119 SetPassphrase(1, kValidPassphrase, false); 125 SetPassphrase(1, kValidPassphrase, false);
120 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 126 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
121 127
122 SetPassphrase(1, kValidPassphrase, false); 128 SetPassphrase(1, kValidPassphrase, false);
123 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 129 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
124 } 130 }
OLDNEW
« no previous file with comments | « chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698