diff options
Diffstat (limited to 'chrome/browser/webdata/web_database_unittest.cc')
-rw-r--r-- | chrome/browser/webdata/web_database_unittest.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc index 25109a7..48301ff 100644 --- a/chrome/browser/webdata/web_database_unittest.cc +++ b/chrome/browser/webdata/web_database_unittest.cc @@ -155,6 +155,10 @@ class WebDatabaseTest : public testing::Test { url->set_prepopulate_id(id); } + static void set_logo_id(TemplateURL* url, int id) { + url->set_logo_id(id); + } + static AutofillEntry MakeAutofillEntry(const char* name, const char* value, time_t timestamp0, @@ -189,6 +193,7 @@ TEST_F(WebDatabaseTest, Keywords) { template_url.set_usage_count(32); template_url.add_input_encoding("UTF-8"); set_prepopulate_id(&template_url, 10); + set_logo_id(&template_url, 1000); SetID(1, &template_url); EXPECT_TRUE(db.AddKeyword(template_url)); @@ -222,6 +227,8 @@ TEST_F(WebDatabaseTest, Keywords) { EXPECT_EQ(10, restored_url->prepopulate_id()); + EXPECT_EQ(1000, restored_url->logo_id()); + EXPECT_TRUE(db.RemoveKeyword(restored_url->id())); template_urls.clear(); @@ -272,6 +279,7 @@ TEST_F(WebDatabaseTest, UpdateKeyword) { EXPECT_EQ(L"url", template_url.keyword()); template_url.add_input_encoding("Shift_JIS"); set_prepopulate_id(&template_url, 5); + set_logo_id(&template_url, 2000); EXPECT_TRUE(db.UpdateKeyword(template_url)); std::vector<TemplateURL*> template_urls; @@ -306,6 +314,8 @@ TEST_F(WebDatabaseTest, UpdateKeyword) { EXPECT_EQ(template_url.prepopulate_id(), restored_url->prepopulate_id()); + EXPECT_EQ(template_url.logo_id(), restored_url->logo_id()); + delete restored_url; } |