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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/memory/scoped_vector.h" | 6 #include "base/memory/scoped_vector.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
23 #include "extensions/common/constants.h" | 23 #include "extensions/common/constants.h" |
24 #include "net/base/net_util.h" | 24 #include "net/base/net_util.h" |
25 #include "sync/api/sync_error_factory.h" | 25 #include "sync/api/sync_error_factory.h" |
26 #include "sync/api/sync_error_factory_mock.h" | 26 #include "sync/api/sync_error_factory_mock.h" |
27 #include "sync/protocol/search_engine_specifics.pb.h" | 27 #include "sync/protocol/search_engine_specifics.pb.h" |
28 #include "sync/protocol/sync.pb.h" | 28 #include "sync/protocol/sync.pb.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 using base::ASCIIToUTF16; | 31 using base::ASCIIToUTF16; |
| 32 using base::UTF8ToUTF16; |
32 using base::Time; | 33 using base::Time; |
33 | 34 |
34 namespace { | 35 namespace { |
35 | 36 |
36 // Extract the GUID from a search engine syncer::SyncData. | 37 // Extract the GUID from a search engine syncer::SyncData. |
37 std::string GetGUID(const syncer::SyncData& sync_data) { | 38 std::string GetGUID(const syncer::SyncData& sync_data) { |
38 return sync_data.GetSpecifics().search_engine().sync_guid(); | 39 return sync_data.GetSpecifics().search_engine().sync_guid(); |
39 } | 40 } |
40 | 41 |
41 // Extract the URL from a search engine syncer::SyncData. | 42 // Extract the URL from a search engine syncer::SyncData. |
(...skipping 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2276 syncer::SyncMergeResult merge_result = model()->MergeDataAndStartSyncing( | 2277 syncer::SyncMergeResult merge_result = model()->MergeDataAndStartSyncing( |
2277 syncer::SEARCH_ENGINES, list, PassProcessor(), | 2278 syncer::SEARCH_ENGINES, list, PassProcessor(), |
2278 CreateAndPassSyncErrorFactory()); | 2279 CreateAndPassSyncErrorFactory()); |
2279 | 2280 |
2280 const TemplateURL* result_turl = model()->GetTemplateURLForGUID("default"); | 2281 const TemplateURL* result_turl = model()->GetTemplateURLForGUID("default"); |
2281 EXPECT_TRUE(result_turl); | 2282 EXPECT_TRUE(result_turl); |
2282 EXPECT_EQ(default_turl->keyword(), result_turl->keyword()); | 2283 EXPECT_EQ(default_turl->keyword(), result_turl->keyword()); |
2283 EXPECT_EQ(default_turl->short_name(), result_turl->short_name()); | 2284 EXPECT_EQ(default_turl->short_name(), result_turl->short_name()); |
2284 EXPECT_EQ(default_turl->url(), result_turl->url()); | 2285 EXPECT_EQ(default_turl->url(), result_turl->url()); |
2285 } | 2286 } |
OLD | NEW |