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

Side by Side Diff: chrome/browser/search_engines/template_url_service_sync_unittest.cc

Issue 9668028: [Sync] Create new top-level sync/ directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 9 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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/search_engines/template_url.h" 9 #include "chrome/browser/search_engines/template_url.h"
10 #include "chrome/browser/search_engines/template_url_service.h" 10 #include "chrome/browser/search_engines/template_url_service.h"
11 #include "chrome/browser/search_engines/template_url_service_factory.h" 11 #include "chrome/browser/search_engines/template_url_service_factory.h"
12 #include "chrome/browser/sync/protocol/search_engine_specifics.pb.h"
13 #include "chrome/browser/sync/protocol/sync.pb.h"
14 #include "chrome/common/chrome_notification_types.h" 12 #include "chrome/common/chrome_notification_types.h"
15 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
16 #include "chrome/test/base/testing_pref_service.h" 14 #include "chrome/test/base/testing_pref_service.h"
17 #include "chrome/test/base/testing_profile.h" 15 #include "chrome/test/base/testing_profile.h"
18 #include "content/public/browser/notification_service.h" 16 #include "content/public/browser/notification_service.h"
17 #include "sync/protocol/search_engine_specifics.pb.h"
18 #include "sync/protocol/sync.pb.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 using base::Time; 21 using base::Time;
22 22
23 namespace { 23 namespace {
24 24
25 // Extract the GUID from a search engine SyncData. 25 // Extract the GUID from a search engine SyncData.
26 std::string GetGUID(const SyncData& sync_data) { 26 std::string GetGUID(const SyncData& sync_data) {
27 return sync_data.GetSpecifics().search_engine().sync_guid(); 27 return sync_data.GetSpecifics().search_engine().sync_guid();
28 } 28 }
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 model()->MergeDataAndStartSyncing( 1292 model()->MergeDataAndStartSyncing(
1293 syncable::SEARCH_ENGINES, 1293 syncable::SEARCH_ENGINES,
1294 CreateInitialSyncData(), 1294 CreateInitialSyncData(),
1295 processor()); 1295 processor());
1296 1296
1297 EXPECT_EQ(3U, model()->GetAllSyncData(syncable::SEARCH_ENGINES).size()); 1297 EXPECT_EQ(3U, model()->GetAllSyncData(syncable::SEARCH_ENGINES).size());
1298 EXPECT_FALSE(model()->GetTemplateURLForGUID("whateverguid")); 1298 EXPECT_FALSE(model()->GetTemplateURLForGUID("whateverguid"));
1299 EXPECT_EQ(model()->GetDefaultSearchProvider(), 1299 EXPECT_EQ(model()->GetDefaultSearchProvider(),
1300 model()->GetTemplateURLForGUID("key1")); 1300 model()->GetTemplateURLForGUID("key1"));
1301 } 1301 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | chrome/browser/sync/abstract_profile_sync_service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698