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

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

Issue 9968016: Move the URL string from TemplateURLRef onto the owning TemplateURL. This will make it easier to m… (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/sync/profile_sync_service_harness.h" 8 #include "chrome/browser/sync/profile_sync_service_harness.h"
9 #include "chrome/browser/sync/test/integration/search_engines_helper.h" 9 #include "chrome/browser/sync/test/integration/search_engines_helper.h"
10 #include "chrome/browser/sync/test/integration/sync_test.h" 10 #include "chrome/browser/sync/test/integration/sync_test.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 DisableVerifier(); 146 DisableVerifier();
147 ASSERT_TRUE(AllServicesMatch()); 147 ASSERT_TRUE(AllServicesMatch());
148 148
149 // Add a different search engine to each client, but make their keywords 149 // Add a different search engine to each client, but make their keywords
150 // conflict. 150 // conflict.
151 AddSearchEngine(0, 0); 151 AddSearchEngine(0, 0);
152 AddSearchEngine(1, 1); 152 AddSearchEngine(1, 1);
153 const TemplateURL* turl = GetServiceForProfile(1)->GetTemplateURLForKeyword( 153 const TemplateURL* turl = GetServiceForProfile(1)->GetTemplateURLForKeyword(
154 ASCIIToUTF16("test1")); 154 ASCIIToUTF16("test1"));
155 EXPECT_TRUE(turl); 155 EXPECT_TRUE(turl);
156 GetServiceForProfile(1)->ResetTemplateURL(turl, 156 GetServiceForProfile(1)->ResetTemplateURL(turl, turl->short_name(),
157 turl->short_name(), 157 ASCIIToUTF16("test0"), turl->url());
158 ASCIIToUTF16("test0"),
159 turl->url()->url());
160 158
161 ASSERT_TRUE(AwaitQuiescence()); 159 ASSERT_TRUE(AwaitQuiescence());
162 ASSERT_TRUE(AllServicesMatch()); 160 ASSERT_TRUE(AllServicesMatch());
163 } 161 }
164 162
165 // TCM ID - 9004187. 163 // TCM ID - 9004187.
166 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, MergeMultiple) { 164 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, MergeMultiple) {
167 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 165 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
168 DisableVerifier(); 166 DisableVerifier();
169 ASSERT_TRUE(AllServicesMatch()); 167 ASSERT_TRUE(AllServicesMatch());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 233 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
236 ASSERT_TRUE(AllServicesMatch()); 234 ASSERT_TRUE(AllServicesMatch());
237 235
238 // Change the default on the first client and delete the old default. 236 // Change the default on the first client and delete the old default.
239 ChangeDefaultSearchProvider(0, 1); 237 ChangeDefaultSearchProvider(0, 1);
240 DeleteSearchEngineBySeed(0, 0); 238 DeleteSearchEngineBySeed(0, 0);
241 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 239 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
242 240
243 ASSERT_TRUE(AllServicesMatch()); 241 ASSERT_TRUE(AllServicesMatch());
244 } 242 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/search_engines_helper.cc ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698