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/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/search_engines/search_terms_data.h" | 10 #include "chrome/browser/search_engines/search_terms_data.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 sync_processor_.get())) { | 252 sync_processor_.get())) { |
253 } | 253 } |
254 | 254 |
255 void TemplateURLServiceSyncTest::SetUp() { | 255 void TemplateURLServiceSyncTest::SetUp() { |
256 test_util_a_.SetUp(); | 256 test_util_a_.SetUp(); |
257 // Use ChangeToLoadState() instead of VerifyLoad() so we don't actually pull | 257 // Use ChangeToLoadState() instead of VerifyLoad() so we don't actually pull |
258 // in the prepopulate data, which the sync tests don't care about (and would | 258 // in the prepopulate data, which the sync tests don't care about (and would |
259 // just foul them up). | 259 // just foul them up). |
260 test_util_a_.ChangeModelToLoadState(); | 260 test_util_a_.ChangeModelToLoadState(); |
261 profile_b_.reset(new TestingProfile); | 261 profile_b_.reset(new TestingProfile); |
262 TemplateURLServiceFactory::GetInstance()->RegisterUserPrefsOnProfile( | 262 TemplateURLServiceFactory::GetInstance()->RegisterUserPrefsOnBrowserContext( |
263 profile_b_.get()); | 263 profile_b_.get()); |
264 model_b_.reset(new TemplateURLService(profile_b_.get())); | 264 model_b_.reset(new TemplateURLService(profile_b_.get())); |
265 model_b_->Load(); | 265 model_b_->Load(); |
266 } | 266 } |
267 | 267 |
268 void TemplateURLServiceSyncTest::TearDown() { | 268 void TemplateURLServiceSyncTest::TearDown() { |
269 test_util_a_.TearDown(); | 269 test_util_a_.TearDown(); |
270 } | 270 } |
271 | 271 |
272 scoped_ptr<syncer::SyncChangeProcessor> | 272 scoped_ptr<syncer::SyncChangeProcessor> |
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2265 syncer::SyncMergeResult merge_result = model()->MergeDataAndStartSyncing( | 2265 syncer::SyncMergeResult merge_result = model()->MergeDataAndStartSyncing( |
2266 syncer::SEARCH_ENGINES, list, PassProcessor(), | 2266 syncer::SEARCH_ENGINES, list, PassProcessor(), |
2267 CreateAndPassSyncErrorFactory()); | 2267 CreateAndPassSyncErrorFactory()); |
2268 | 2268 |
2269 const TemplateURL* result_turl = model()->GetTemplateURLForGUID("default"); | 2269 const TemplateURL* result_turl = model()->GetTemplateURLForGUID("default"); |
2270 EXPECT_TRUE(result_turl); | 2270 EXPECT_TRUE(result_turl); |
2271 EXPECT_EQ(default_turl->keyword(), result_turl->keyword()); | 2271 EXPECT_EQ(default_turl->keyword(), result_turl->keyword()); |
2272 EXPECT_EQ(default_turl->short_name(), result_turl->short_name()); | 2272 EXPECT_EQ(default_turl->short_name(), result_turl->short_name()); |
2273 EXPECT_EQ(default_turl->url(), result_turl->url()); | 2273 EXPECT_EQ(default_turl->url(), result_turl->url()); |
2274 } | 2274 } |
OLD | NEW |