OLD | NEW |
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/macros.h" | 5 #include "base/macros.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/search_engines/template_url_service_factory.h" | 7 #include "chrome/browser/search_engines/template_url_service_factory.h" |
8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 8 #include "chrome/browser/sync/test/integration/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_datatype_helper.h" | 10 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); | 190 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); |
191 } | 191 } |
192 | 192 |
193 // TCM ID - 8906436. | 193 // TCM ID - 8906436. |
194 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DisableSync) { | 194 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DisableSync) { |
195 ASSERT_TRUE(SetupSync()); | 195 ASSERT_TRUE(SetupSync()); |
196 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); | 196 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); |
197 | 197 |
198 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes()); | 198 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes()); |
199 search_engines_helper::AddSearchEngine(0, 0); | 199 search_engines_helper::AddSearchEngine(0, 0); |
200 ASSERT_TRUE( | 200 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService(0))); |
201 AwaitCommitActivityCompletion(GetSyncService((0)))); | |
202 ASSERT_TRUE(search_engines_helper::ServiceMatchesVerifier(0)); | 201 ASSERT_TRUE(search_engines_helper::ServiceMatchesVerifier(0)); |
203 ASSERT_FALSE(search_engines_helper::ServiceMatchesVerifier(1)); | 202 ASSERT_FALSE(search_engines_helper::ServiceMatchesVerifier(1)); |
204 | 203 |
205 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); | 204 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); |
206 ASSERT_TRUE(AwaitQuiescence()); | 205 ASSERT_TRUE(AwaitQuiescence()); |
207 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); | 206 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); |
208 } | 207 } |
209 | 208 |
210 // TCM ID - 8891809. | 209 // TCM ID - 8891809. |
211 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, | 210 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, |
(...skipping 23 matching lines...) Expand all Loading... |
235 ASSERT_TRUE(search_engines_helper::AwaitAllServicesMatch()); | 234 ASSERT_TRUE(search_engines_helper::AwaitAllServicesMatch()); |
236 | 235 |
237 search_engines_helper::ChangeDefaultSearchProvider(0, 0); | 236 search_engines_helper::ChangeDefaultSearchProvider(0, 0); |
238 ASSERT_TRUE(search_engines_helper::AwaitAllServicesMatch()); | 237 ASSERT_TRUE(search_engines_helper::AwaitAllServicesMatch()); |
239 | 238 |
240 // Change the default on the first client and delete the old default. | 239 // Change the default on the first client and delete the old default. |
241 search_engines_helper::ChangeDefaultSearchProvider(0, 1); | 240 search_engines_helper::ChangeDefaultSearchProvider(0, 1); |
242 search_engines_helper::DeleteSearchEngineBySeed(0, 0); | 241 search_engines_helper::DeleteSearchEngineBySeed(0, 0); |
243 ASSERT_TRUE(search_engines_helper::AwaitAllServicesMatch()); | 242 ASSERT_TRUE(search_engines_helper::AwaitAllServicesMatch()); |
244 } | 243 } |
OLD | NEW |