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

Unified Diff: sync/syncable/directory_backing_store_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: Restore file rename Created 4 years, 7 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
« sql/test/scoped_error_expecter.cc ('K') | « sql/test/scoped_error_ignorer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory_backing_store_unittest.cc
diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc
index bd049be2cb57d884fcda01de74f10d3035d46f1c..f6f10f132fb0bb14b9ef5c7edb3a51638478b946 100644
--- a/sync/syncable/directory_backing_store_unittest.cc
+++ b/sync/syncable/directory_backing_store_unittest.cc
@@ -21,7 +21,7 @@
#include "build/build_config.h"
#include "sql/connection.h"
#include "sql/statement.h"
-#include "sql/test/scoped_error_ignorer.h"
+#include "sql/test/scoped_error_expecter.h"
#include "sql/test/test_helpers.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/node_ordinal.h"
@@ -4221,11 +4221,11 @@ TEST_F(DirectoryBackingStoreTest,
ASSERT_TRUE(dbs->db_->has_error_callback());
{
// The corruption will be detected when we attempt to load the data. Use a
- // ScopedErrorIgnorer to ensure we don't crash in debug builds.
- sql::ScopedErrorIgnorer error_ignorer;
- error_ignorer.IgnoreError(SQLITE_CORRUPT);
+ // ScopedErrorExpecter to ensure we don't crash in debug builds.
+ sql::test::ScopedErrorExpecter expecter;
+ expecter.ExpectError(SQLITE_CORRUPT);
ASSERT_TRUE(LoadAndIgnoreReturnedData(dbs.get()));
- ASSERT_TRUE(error_ignorer.CheckIgnoredErrors());
+ ASSERT_TRUE(expecter.SawExpectedErrors());
}
// See that the first open failed as expected.
ASSERT_TRUE(dbs->DidFailFirstOpenAttempt());
« sql/test/scoped_error_expecter.cc ('K') | « sql/test/scoped_error_ignorer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698