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

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

Issue 2016463003: [sync] DCHECK from UTF16ToASCII from TemplateURLService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | components/search_engines/template_url_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 const char kNewGUID[] = "newdefault"; 2265 const char kNewGUID[] = "newdefault";
2266 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"), 2266 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"),
2267 "http://thewhat.com/{searchTerms}", 2267 "http://thewhat.com/{searchTerms}",
2268 kNewGUID)); 2268 kNewGUID));
2269 model()->SetUserSelectedDefaultSearchProvider( 2269 model()->SetUserSelectedDefaultSearchProvider(
2270 model()->GetTemplateURLForGUID(kNewGUID)); 2270 model()->GetTemplateURLForGUID(kNewGUID));
2271 2271
2272 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString( 2272 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString(
2273 prefs::kSyncedDefaultSearchProviderGUID)); 2273 prefs::kSyncedDefaultSearchProviderGUID));
2274 } 2274 }
2275
2276 TEST_F(TemplateURLServiceSyncTest, NonAsciiKeywordDoesNotCrash) {
2277 model()->Add(CreateTestTemplateURL(UTF8ToUTF16("\xf0\xaf\xa6\x8d"),
2278 "http://key1.com"));
2279 syncer::SyncDataList initial_data = CreateInitialSyncData();
2280
2281 model()->MergeDataAndStartSyncing(
2282 syncer::SEARCH_ENGINES, initial_data, PassProcessor(),
2283 CreateAndPassSyncErrorFactory());
2284 }
OLDNEW
« no previous file with comments | « no previous file | components/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698