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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "chrome/browser/search_engines/template_url_service_factory.h" | 6 #include "chrome/browser/search_engines/template_url_service_factory.h" |
7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
8 #include "chrome/browser/sync/test/integration/search_engines_helper.h" | 8 #include "chrome/browser/sync/test/integration/search_engines_helper.h" |
9 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 9 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
10 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 10 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
11 #include "chrome/browser/sync/test/integration/sync_test.h" | 11 #include "chrome/browser/sync/test/integration/sync_test.h" |
12 #include "components/search_engines/template_url.h" | 12 #include "components/search_engines/template_url.h" |
13 #include "components/search_engines/template_url_service.h" | 13 #include "components/search_engines/template_url_service.h" |
14 | 14 |
15 using base::ASCIIToUTF16; | 15 using base::ASCIIToUTF16; |
16 using sync_integration_test_util::AwaitCommitActivityCompletion; | 16 using sync_integration_test_util::AwaitCommitActivityCompletion; |
17 | 17 |
18 class TwoClientSearchEnginesSyncTest : public SyncTest { | 18 class TwoClientSearchEnginesSyncTest : public SyncTest { |
19 public: | 19 public: |
20 TwoClientSearchEnginesSyncTest() : SyncTest(TWO_CLIENT) {} | 20 TwoClientSearchEnginesSyncTest() : SyncTest(TWO_CLIENT) {} |
21 virtual ~TwoClientSearchEnginesSyncTest() {} | 21 ~TwoClientSearchEnginesSyncTest() override {} |
22 | 22 |
23 private: | 23 private: |
24 DISALLOW_COPY_AND_ASSIGN(TwoClientSearchEnginesSyncTest); | 24 DISALLOW_COPY_AND_ASSIGN(TwoClientSearchEnginesSyncTest); |
25 }; | 25 }; |
26 | 26 |
27 // TCM ID - 8898628. | 27 // TCM ID - 8898628. |
28 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Add) { | 28 IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Add) { |
29 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 29 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
30 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); | 30 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); |
31 | 31 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 234 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
235 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); | 235 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); |
236 | 236 |
237 // Change the default on the first client and delete the old default. | 237 // Change the default on the first client and delete the old default. |
238 search_engines_helper::ChangeDefaultSearchProvider(0, 1); | 238 search_engines_helper::ChangeDefaultSearchProvider(0, 1); |
239 search_engines_helper::DeleteSearchEngineBySeed(0, 0); | 239 search_engines_helper::DeleteSearchEngineBySeed(0, 0); |
240 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 240 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
241 | 241 |
242 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); | 242 ASSERT_TRUE(search_engines_helper::AllServicesMatch()); |
243 } | 243 } |
OLD | NEW |