OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |