Index: chrome/browser/sync/test/integration/search_engines_helper.cc |
diff --git a/chrome/browser/sync/test/integration/search_engines_helper.cc b/chrome/browser/sync/test/integration/search_engines_helper.cc |
index adc3ed77ae1a77d79e3b831f49fb73a0b6641c9b..af5eae928ba39b885f7cdae3ffc5b7b1d88173a8 100644 |
--- a/chrome/browser/sync/test/integration/search_engines_helper.cc |
+++ b/chrome/browser/sync/test/integration/search_engines_helper.cc |
@@ -86,7 +86,7 @@ bool ServiceMatchesVerifier(int profile) { |
std::vector<const TemplateURL*> verifier_turls = verifier->GetTemplateURLs(); |
if (verifier_turls.size() != other->GetTemplateURLs().size()) { |
- LOG(ERROR) << "verifier and other service have a different count of TURLs: " |
+ LOG(ERROR) << "Verifier and other service have a different count of TURLs: " |
<< verifier_turls.size() << " vs " |
<< other->GetTemplateURLs().size() << " respectively."; |
return false; |
@@ -156,8 +156,10 @@ bool ServicesMatch(int profile_a, int profile_b) { |
bool AllServicesMatch() { |
// Use 0 as the baseline. |
- if (!ServiceMatchesVerifier(0)) |
+ if (test()->use_verifier() && !ServiceMatchesVerifier(0)) { |
+ LOG(ERROR) << "TemplateURLService 0 does not match verifier."; |
return false; |
+ } |
for (int it = 0; it < test()->num_clients(); ++it) { |
Raghu Simha
2011/11/16 19:44:43
|it| can be initialized to 1, since there's no poi
SteveT
2011/11/16 21:25:38
Done.
|
if (!ServicesMatch(0, it)) { |
@@ -241,15 +243,15 @@ void DeleteSearchEngineBySeed(int profile, int seed) { |
void ChangeDefaultSearchProvider(int profile, int seed) { |
TemplateURLService* service = GetServiceForProfile(profile); |
ASSERT_TRUE(service); |
- const TemplateURL* new_default = service->GetTemplateURLForKeyword( |
+ const TemplateURL* turl = service->GetTemplateURLForKeyword( |
CreateKeyword(seed)); |
- ASSERT_TRUE(new_default); |
- service->SetDefaultSearchProvider(new_default); |
+ ASSERT_TRUE(turl); |
+ service->SetDefaultSearchProvider(turl); |
if (test()->use_verifier()) { |
- new_default = GetVerifierService()->GetTemplateURLForKeyword( |
- CreateKeyword(seed)); |
- ASSERT_TRUE(new_default); |
- GetVerifierService()->SetDefaultSearchProvider(new_default); |
+ const TemplateURL* verifier_turl = |
+ GetVerifierService()->GetTemplateURLForKeyword(CreateKeyword(seed)); |
+ ASSERT_TRUE(verifier_turl); |
+ GetVerifierService()->SetDefaultSearchProvider(verifier_turl); |
} |
} |