summaryrefslogtreecommitdiffstats
path: root/chrome/browser/webdata/web_database_unittest.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 00:19:44 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 00:19:44 +0000
commitb3b2d6e76a2cfbb02933298c565d3718b0288774 (patch)
tree548c4d8fe0b7c7d22c44e045a61c7719977359cc /chrome/browser/webdata/web_database_unittest.cc
parent5786d3d3a7cd151fb5dc0aa2f1f0d84460fb6cdf (diff)
downloadchromium_src-b3b2d6e76a2cfbb02933298c565d3718b0288774.zip
chromium_src-b3b2d6e76a2cfbb02933298c565d3718b0288774.tar.gz
chromium_src-b3b2d6e76a2cfbb02933298c565d3718b0288774.tar.bz2
Fixes two related bugs:
. If we can't init the web db a dialog is shown to the user. . If we can't init the web db the default search provider no longer becomes NULL. BUG=28374 TEST=none Review URL: http://codereview.chromium.org/501090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata/web_database_unittest.cc')
-rw-r--r--chrome/browser/webdata/web_database_unittest.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc
index eb94e4f..ef62933 100644
--- a/chrome/browser/webdata/web_database_unittest.cc
+++ b/chrome/browser/webdata/web_database_unittest.cc
@@ -113,7 +113,7 @@ class WebDatabaseTest : public testing::Test {
TEST_F(WebDatabaseTest, Keywords) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
TemplateURL template_url;
template_url.set_short_name(L"short_name");
@@ -174,7 +174,7 @@ TEST_F(WebDatabaseTest, Keywords) {
TEST_F(WebDatabaseTest, KeywordMisc) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
ASSERT_EQ(0, db.GetDefaulSearchProviderID());
ASSERT_EQ(0, db.GetBuitinKeywordVersion());
@@ -189,7 +189,7 @@ TEST_F(WebDatabaseTest, KeywordMisc) {
TEST_F(WebDatabaseTest, UpdateKeyword) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
TemplateURL template_url;
template_url.set_short_name(L"short_name");
@@ -251,7 +251,7 @@ TEST_F(WebDatabaseTest, UpdateKeyword) {
TEST_F(WebDatabaseTest, KeywordWithNoFavicon) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
TemplateURL template_url;
template_url.set_short_name(L"short_name");
@@ -278,7 +278,7 @@ TEST_F(WebDatabaseTest, KeywordWithNoFavicon) {
TEST_F(WebDatabaseTest, Logins) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
std::vector<PasswordForm*> result;
@@ -411,7 +411,7 @@ TEST_F(WebDatabaseTest, Logins) {
TEST_F(WebDatabaseTest, Autofill) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
Time t1 = Time::Now();
@@ -645,7 +645,7 @@ static void ClearResults(std::vector<PasswordForm*>* results) {
TEST_F(WebDatabaseTest, ClearPrivateData_SavedPasswords) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
std::vector<PasswordForm*> result;
@@ -687,7 +687,7 @@ TEST_F(WebDatabaseTest, ClearPrivateData_SavedPasswords) {
TEST_F(WebDatabaseTest, BlacklistedLogins) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
std::vector<PasswordForm*> result;
// Verify the database is empty.
@@ -726,7 +726,7 @@ TEST_F(WebDatabaseTest, BlacklistedLogins) {
TEST_F(WebDatabaseTest, WebAppHasAllImages) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
GURL url("http://google.com/");
// Initial value for unknown web app should be false.
@@ -744,7 +744,7 @@ TEST_F(WebDatabaseTest, WebAppHasAllImages) {
TEST_F(WebDatabaseTest, WebAppImages) {
WebDatabase db;
- ASSERT_TRUE(db.Init(file_));
+ ASSERT_EQ(sql::INIT_OK, db.Init(file_));
GURL url("http://google.com/");
// Web app should initially have no images.