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

Side by Side Diff: chrome/browser/webdata/keyword_table_unittest.cc

Issue 7230053: Modify TemplateURLRef to remove unknown URL parameters, but only when it represents a prepopulate... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.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/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 25 matching lines...) Expand all
36 36
37 static int64 GetID(const TemplateURL* url) { 37 static int64 GetID(const TemplateURL* url) {
38 return url->id(); 38 return url->id();
39 } 39 }
40 40
41 static void SetID(int64 new_id, TemplateURL* url) { 41 static void SetID(int64 new_id, TemplateURL* url) {
42 url->set_id(new_id); 42 url->set_id(new_id);
43 } 43 }
44 44
45 static void set_prepopulate_id(TemplateURL* url, int id) { 45 static void set_prepopulate_id(TemplateURL* url, int id) {
46 url->set_prepopulate_id(id); 46 url->SetPrepopulateId(id);
47 } 47 }
48 48
49 static void set_logo_id(TemplateURL* url, int id) { 49 static void set_logo_id(TemplateURL* url, int id) {
50 url->set_logo_id(id); 50 url->set_logo_id(id);
51 } 51 }
52 52
53 FilePath file_; 53 FilePath file_;
54 54
55 private: 55 private:
56 DISALLOW_COPY_AND_ASSIGN(KeywordTableTest); 56 DISALLOW_COPY_AND_ASSIGN(KeywordTableTest);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 EXPECT_EQ(1U, template_urls.size()); 244 EXPECT_EQ(1U, template_urls.size());
245 const TemplateURL* restored_url = template_urls.front(); 245 const TemplateURL* restored_url = template_urls.front();
246 246
247 EXPECT_EQ(template_url.short_name(), restored_url->short_name()); 247 EXPECT_EQ(template_url.short_name(), restored_url->short_name());
248 EXPECT_EQ(template_url.keyword(), restored_url->keyword()); 248 EXPECT_EQ(template_url.keyword(), restored_url->keyword());
249 EXPECT_TRUE(!restored_url->GetFaviconURL().is_valid()); 249 EXPECT_TRUE(!restored_url->GetFaviconURL().is_valid());
250 EXPECT_TRUE(restored_url->safe_for_autoreplace()); 250 EXPECT_TRUE(restored_url->safe_for_autoreplace());
251 EXPECT_EQ(GetID(&template_url), GetID(restored_url)); 251 EXPECT_EQ(GetID(&template_url), GetID(restored_url));
252 delete restored_url; 252 delete restored_url;
253 } 253 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698