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

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

Issue 10173001: Add a Profile* member to TemplateURL. This makes some invocations of ReplaceSearchTerms() a bit le… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/search_engines/template_url.h" 6 #include "chrome/browser/search_engines/template_url.h"
7 #include "chrome/browser/search_engines/template_url_service.h" 7 #include "chrome/browser/search_engines/template_url_service.h"
8 #include "chrome/browser/search_engines/template_url_service_factory.h"
8 #include "chrome/browser/sync/profile_sync_service_harness.h" 9 #include "chrome/browser/sync/profile_sync_service_harness.h"
9 #include "chrome/browser/sync/test/integration/search_engines_helper.h" 10 #include "chrome/browser/sync/test/integration/search_engines_helper.h"
11 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
10 #include "chrome/browser/sync/test/integration/sync_test.h" 12 #include "chrome/browser/sync/test/integration/sync_test.h"
11 13
12 using search_engines_helper::AddSearchEngine;
13 using search_engines_helper::AllServicesMatch;
14 using search_engines_helper::ChangeDefaultSearchProvider;
15 using search_engines_helper::CreateTestTemplateURL;
16 using search_engines_helper::DeleteSearchEngineBySeed;
17 using search_engines_helper::EditSearchEngine;
18 using search_engines_helper::GetServiceForProfile;
19 using search_engines_helper::GetVerifierService;
20 using search_engines_helper::ServiceMatchesVerifier;
21
22 class TwoClientSearchEnginesSyncTest : public SyncTest { 14 class TwoClientSearchEnginesSyncTest : public SyncTest {
23 public: 15 public:
24 TwoClientSearchEnginesSyncTest() : SyncTest(TWO_CLIENT) {} 16 TwoClientSearchEnginesSyncTest() : SyncTest(TWO_CLIENT) {}
25 virtual ~TwoClientSearchEnginesSyncTest() {} 17 virtual ~TwoClientSearchEnginesSyncTest() {}
26 18
27 private: 19 private:
28 DISALLOW_COPY_AND_ASSIGN(TwoClientSearchEnginesSyncTest); 20 DISALLOW_COPY_AND_ASSIGN(TwoClientSearchEnginesSyncTest);
29 }; 21 };
30 22
31 // TCM ID - 8898628. 23 // TCM ID - 8898628.
32 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Add) { 24 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Add) {
33 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 25 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
34 ASSERT_TRUE(AllServicesMatch()); 26 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
35 27
36 AddSearchEngine(0, 0); 28 search_engines_helper::AddSearchEngine(0, 0);
37 29
38 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 30 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
39 ASSERT_TRUE(AllServicesMatch()); 31 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
40 } 32 }
41 33
42 // TCM ID - 8912240. 34 // TCM ID - 8912240.
43 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, AddMultiple) { 35 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, AddMultiple) {
44 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 36 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
45 ASSERT_TRUE(AllServicesMatch()); 37 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
46 38
47 // Add a few entries. 39 // Add a few entries.
48 for (int i = 0; i < 3; ++i) { 40 for (int i = 0; i < 3; ++i)
49 AddSearchEngine(0, i); 41 search_engines_helper::AddSearchEngine(0, i);
50 } 42
51 43 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
52 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 44 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
53 ASSERT_TRUE(AllServicesMatch());
54 } 45 }
55 46
56 // TCM ID - 9011135. 47 // TCM ID - 9011135.
57 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Duplicates) { 48 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Duplicates) {
58 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 49 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
59 ASSERT_TRUE(AllServicesMatch()); 50 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
60 51
61 // Add two entries with the same Name and URL (but different keywords). 52 // Add two entries with the same Name and URL (but different keywords).
62 // Note that we have to change the GUID of the duplicate. 53 // Note that we have to change the GUID of the duplicate.
63 AddSearchEngine(0, 0); 54 search_engines_helper::AddSearchEngine(0, 0);
64 GetServiceForProfile(0)->Add(CreateTestTemplateURL(0, 55 Profile* profile = sync_datatype_helper::test()->GetProfile(0);
65 ASCIIToUTF16("somethingelse"), "newguid")); 56 TemplateURLServiceFactory::GetForProfile(profile)->Add(
66 GetVerifierService()->Add(CreateTestTemplateURL(0, 57 search_engines_helper::CreateTestTemplateURL(profile, 0,
67 ASCIIToUTF16("somethingelse"), "newguid")); 58 ASCIIToUTF16("somethingelse"), "newguid"));
68 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 59 search_engines_helper::GetVerifierService()->Add(
69 ASSERT_TRUE(AllServicesMatch()); 60 search_engines_helper::CreateTestTemplateURL(profile, 0,
61 ASCIIToUTF16("somethingelse"), "newguid"));
62 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
63 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
70 } 64 }
71 65
72 // TCM ID - 9004201. 66 // TCM ID - 9004201.
73 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateKeyword) { 67 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateKeyword) {
74 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 68 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
75 ASSERT_TRUE(AllServicesMatch()); 69 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
76 70
77 AddSearchEngine(0, 0); 71 search_engines_helper::AddSearchEngine(0, 0);
78 72
79 // Change the keyword. 73 // Change the keyword.
80 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 74 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
81 ASSERT_TRUE(AllServicesMatch()); 75 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
82 76
83 EditSearchEngine(0, ASCIIToUTF16("test0"), ASCIIToUTF16("test0"), 77 search_engines_helper::EditSearchEngine(0, ASCIIToUTF16("test0"),
84 ASCIIToUTF16("newkeyword"), "http://www.test0.com/"); 78 ASCIIToUTF16("test0"), ASCIIToUTF16("newkeyword"),
85 79 "http://www.test0.com/");
86 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 80
87 ASSERT_TRUE(AllServicesMatch()); 81 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
82 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
88 } 83 }
89 84
90 // TCM ID - 8894859. 85 // TCM ID - 8894859.
91 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateUrl) { 86 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateUrl) {
92 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 87 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
93 ASSERT_TRUE(AllServicesMatch()); 88 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
94 89
95 AddSearchEngine(0, 0); 90 search_engines_helper::AddSearchEngine(0, 0);
96 91
97 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 92 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
98 ASSERT_TRUE(AllServicesMatch()); 93 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
99 94
100 // Change the URL. 95 // Change the URL.
101 EditSearchEngine(0, ASCIIToUTF16("test0"), ASCIIToUTF16("test0"), 96 search_engines_helper::EditSearchEngine(0, ASCIIToUTF16("test0"),
102 ASCIIToUTF16("test0"), "http://www.wikipedia.org/q=%s"); 97 ASCIIToUTF16("test0"), ASCIIToUTF16("test0"),
103 98 "http://www.wikipedia.org/q=%s");
104 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 99
105 ASSERT_TRUE(AllServicesMatch()); 100 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
101 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
106 } 102 }
107 103
108 // TCM ID - 8910490. 104 // TCM ID - 8910490.
109 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateName) { 105 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateName) {
110 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 106 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
111 ASSERT_TRUE(AllServicesMatch()); 107 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
112 108
113 AddSearchEngine(0, 0); 109 search_engines_helper::AddSearchEngine(0, 0);
114 110
115 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 111 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
116 ASSERT_TRUE(AllServicesMatch()); 112 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
117 113
118 // Change the short name. 114 // Change the short name.
119 EditSearchEngine(0, ASCIIToUTF16("test0"), ASCIIToUTF16("New Name"), 115 search_engines_helper::EditSearchEngine(0, ASCIIToUTF16("test0"),
120 ASCIIToUTF16("test0"), "http://www.test0.com/"); 116 ASCIIToUTF16("New Name"), ASCIIToUTF16("test0"), "http://www.test0.com/");
121 117
122 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 118 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
123 ASSERT_TRUE(AllServicesMatch()); 119 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
124 } 120 }
125 121
126 // TCM ID - 8898660. 122 // TCM ID - 8898660.
127 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Delete) { 123 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Delete) {
128 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 124 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
129 ASSERT_TRUE(AllServicesMatch()); 125 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
130 126
131 AddSearchEngine(0, 0); 127 search_engines_helper::AddSearchEngine(0, 0);
132 128
133 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 129 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
134 ASSERT_TRUE(AllServicesMatch()); 130 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
135 131
136 DeleteSearchEngineBySeed(0, 0); 132 search_engines_helper::DeleteSearchEngineBySeed(0, 0);
137 133
138 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 134 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
139 ASSERT_TRUE(AllServicesMatch()); 135 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
140 } 136 }
141 137
142 // TCM ID - 9004196. 138 // TCM ID - 9004196.
143 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, ConflictKeyword) { 139 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, ConflictKeyword) {
144 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 140 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
145 DisableVerifier(); 141 DisableVerifier();
146 ASSERT_TRUE(AllServicesMatch()); 142 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
147 143
148 // Add a different search engine to each client, but make their keywords 144 // Add a different search engine to each client, but make their keywords
149 // conflict. 145 // conflict.
150 AddSearchEngine(0, 0); 146 search_engines_helper::AddSearchEngine(0, 0);
151 AddSearchEngine(1, 1); 147 search_engines_helper::AddSearchEngine(1, 1);
152 const TemplateURL* turl = GetServiceForProfile(1)->GetTemplateURLForKeyword( 148 TemplateURLService* service = search_engines_helper::GetServiceForProfile(1);
153 ASCIIToUTF16("test1")); 149 const TemplateURL* turl =
150 service->GetTemplateURLForKeyword(ASCIIToUTF16("test1"));
154 EXPECT_TRUE(turl); 151 EXPECT_TRUE(turl);
155 GetServiceForProfile(1)->ResetTemplateURL(turl, turl->short_name(), 152 service->ResetTemplateURL(turl, turl->short_name(), ASCIIToUTF16("test0"),
156 ASCIIToUTF16("test0"), turl->url()); 153 turl->url());
157 154
158 ASSERT_TRUE(AwaitQuiescence()); 155 ASSERT_TRUE(AwaitQuiescence());
159 ASSERT_TRUE(AllServicesMatch()); 156 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
160 } 157 }
161 158
162 // TCM ID - 9004187. 159 // TCM ID - 9004187.
163 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, MergeMultiple) { 160 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, MergeMultiple) {
164 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 161 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
165 DisableVerifier(); 162 DisableVerifier();
166 ASSERT_TRUE(AllServicesMatch()); 163 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
167 164
168 // Set up some different search engines on each client, with some interesting 165 // Set up some different search engines on each client, with some interesting
169 // conflicts. 166 // conflicts.
170 // client0: { SE0, SE1, SE2 } 167 // client0: { SE0, SE1, SE2 }
171 for (int i = 0; i < 3; ++i) { 168 for (int i = 0; i < 3; ++i)
172 AddSearchEngine(0, i); 169 search_engines_helper::AddSearchEngine(0, i);
173 }
174 170
175 // client1: { SE0, SE2, SE3, SE0 + different URL } 171 // client1: { SE0, SE2, SE3, SE0 + different URL }
176 AddSearchEngine(1, 0); 172 search_engines_helper::AddSearchEngine(1, 0);
177 AddSearchEngine(1, 2); 173 search_engines_helper::AddSearchEngine(1, 2);
178 AddSearchEngine(1, 3); 174 search_engines_helper::AddSearchEngine(1, 3);
179 GetServiceForProfile(1)->Add(CreateTestTemplateURL(0, 175 Profile* profile = sync_datatype_helper::test()->GetProfile(1);
180 ASCIIToUTF16("somethingelse.com"), "http://www.somethingelse.com/", 176 TemplateURLServiceFactory::GetForProfile(profile)->Add(
181 "somethingelse")); 177 search_engines_helper::CreateTestTemplateURL(profile, 0,
178 ASCIIToUTF16("somethingelse.com"), "http://www.somethingelse.com/",
179 "somethingelse"));
182 180
183 ASSERT_TRUE(AwaitQuiescence()); 181 ASSERT_TRUE(AwaitQuiescence());
184 ASSERT_TRUE(AllServicesMatch()); 182 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
185 } 183 }
186 184
187 // TCM ID - 8906436. 185 // TCM ID - 8906436.
188 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DisableSync) { 186 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DisableSync) {
189 ASSERT_TRUE(SetupSync()); 187 ASSERT_TRUE(SetupSync());
190 ASSERT_TRUE(AllServicesMatch()); 188 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
191 189
192 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes()); 190 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes());
193 AddSearchEngine(0, 0); 191 search_engines_helper::AddSearchEngine(0, 0);
194 ASSERT_TRUE( 192 ASSERT_TRUE(
195 GetClient(0)->AwaitFullSyncCompletion("Added a search engine.")); 193 GetClient(0)->AwaitFullSyncCompletion("Added a search engine."));
196 ASSERT_TRUE(ServiceMatchesVerifier(0)); 194 ASSERT_TRUE(search_engines_helper::ServiceMatchesVerifier(0));
197 ASSERT_FALSE(ServiceMatchesVerifier(1)); 195 ASSERT_FALSE(search_engines_helper::ServiceMatchesVerifier(1));
198 196
199 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); 197 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes());
200 ASSERT_TRUE(AwaitQuiescence()); 198 ASSERT_TRUE(AwaitQuiescence());
201 ASSERT_TRUE(AllServicesMatch()); 199 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
202 } 200 }
203 201
204 // TCM ID - 8891809. 202 // TCM ID - 8891809.
205 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, SyncDefault) { 203 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, SyncDefault) {
206 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 204 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
207 ASSERT_TRUE(AllServicesMatch()); 205 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
208 206
209 AddSearchEngine(0, 0); 207 search_engines_helper::AddSearchEngine(0, 0);
210 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 208 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
211 209
212 // Change the default to the new search engine, sync, and ensure that it 210 // Change the default to the new search engine, sync, and ensure that it
213 // changed in the second client. AllServicesMatch does a default search 211 // changed in the second client. AllServicesMatch does a default search
214 // provider check. 212 // provider check.
215 ChangeDefaultSearchProvider(0, 0); 213 search_engines_helper::ChangeDefaultSearchProvider(0, 0);
216 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 214 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
217 215
218 ASSERT_TRUE(AllServicesMatch()); 216 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
219 } 217 }
220 218
221 // Ensure that we can change the search engine and immediately delete it 219 // Ensure that we can change the search engine and immediately delete it
222 // without putting the clients out of sync. 220 // without putting the clients out of sync.
223 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DeleteSyncedDefault) { 221 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DeleteSyncedDefault) {
224 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 222 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
225 ASSERT_TRUE(AllServicesMatch()); 223 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
226 224
227 AddSearchEngine(0, 0); 225 search_engines_helper::AddSearchEngine(0, 0);
228 AddSearchEngine(0, 1); 226 search_engines_helper::AddSearchEngine(0, 1);
229 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 227 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
230 228
231 ChangeDefaultSearchProvider(0, 0); 229 search_engines_helper::ChangeDefaultSearchProvider(0, 0);
232 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 230 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
233 ASSERT_TRUE(AllServicesMatch()); 231 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
234 232
235 // Change the default on the first client and delete the old default. 233 // Change the default on the first client and delete the old default.
236 ChangeDefaultSearchProvider(0, 1); 234 search_engines_helper::ChangeDefaultSearchProvider(0, 1);
237 DeleteSearchEngineBySeed(0, 0); 235 search_engines_helper::DeleteSearchEngineBySeed(0, 0);
238 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 236 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
239 237
240 ASSERT_TRUE(AllServicesMatch()); 238 ASSERT_TRUE(search_engines_helper::AllServicesMatch());
241 } 239 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698