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

Unified Diff: content/browser/databases_table_unittest.cc

Issue 1991503002: [sql] sql::ScopedErrorIgnorer rename to sql::test::ScopedErrorExpecter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/databases_table_unittest.cc
diff --git a/content/browser/databases_table_unittest.cc b/content/browser/databases_table_unittest.cc
index 9353ad45557bcbabae2ea1e2fe3ebe213e15952f..2d6ba259f86fbe212198c03bdfb5819fc78da3fc 100644
--- a/content/browser/databases_table_unittest.cc
+++ b/content/browser/databases_table_unittest.cc
@@ -9,7 +9,7 @@
#include "base/strings/utf_string_conversions.h"
#include "sql/connection.h"
#include "sql/statement.h"
-#include "sql/test/scoped_error_ignorer.h"
+#include "sql/test/scoped_error_expecter.h"
#include "storage/browser/database/databases_table.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/sqlite/sqlite3.h"
@@ -38,13 +38,13 @@ TEST(DatabasesTableTest, TestIt) {
// Initialize the 'Databases' table.
sql::Connection db;
- sql::ScopedErrorIgnorer ignore_errors;
+ sql::test::ScopedErrorExpecter expecter;
// TODO(shess): Suppressing SQLITE_CONSTRAINT because the code
// expects that and handles the resulting error. Consider revising
// the code to use INSERT OR IGNORE (which would not throw
// SQLITE_CONSTRAINT) and then check ChangeCount() to see if any
// changes were made.
- ignore_errors.IgnoreError(SQLITE_CONSTRAINT);
+ expecter.ExpectError(SQLITE_CONSTRAINT);
// Initialize the temp dir and the 'Databases' table.
EXPECT_TRUE(db.OpenInMemory());
@@ -148,7 +148,7 @@ TEST(DatabasesTableTest, TestIt) {
EXPECT_FALSE(databases_table.DeleteDatabaseDetails(
"unknown_origin", ASCIIToUTF16("unknown_database")));
- ASSERT_TRUE(ignore_errors.CheckIgnoredErrors());
+ ASSERT_TRUE(expecter.SawExpectedErrors());
}
} // namespace content
« no previous file with comments | « content/browser/appcache/appcache_database_unittest.cc ('k') | content/browser/dom_storage/dom_storage_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698