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

Unified Diff: components/password_manager/core/browser/affiliation_database_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: components/password_manager/core/browser/affiliation_database_unittest.cc
diff --git a/components/password_manager/core/browser/affiliation_database_unittest.cc b/components/password_manager/core/browser/affiliation_database_unittest.cc
index dab796807beeabd370eee1a9b46882d6e6d34fb4..916494883c17ca0c1db0ee9fab3aaa467938f8b4 100644
--- a/components/password_manager/core/browser/affiliation_database_unittest.cc
+++ b/components/password_manager/core/browser/affiliation_database_unittest.cc
@@ -9,7 +9,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
-#include "sql/test/scoped_error_ignorer.h"
+#include "sql/test/scoped_error_expecter.h"
#include "sql/test/test_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -112,22 +112,22 @@ TEST_F(AffiliationDatabaseTest, Store) {
// Verify that duplicate equivalence classes are not allowed to be stored.
{
- sql::ScopedErrorIgnorer error_ignorer;
- error_ignorer.IgnoreError(SQLITE_CONSTRAINT);
+ sql::test::ScopedErrorExpecter expecter;
+ expecter.ExpectError(SQLITE_CONSTRAINT);
AffiliatedFacetsWithUpdateTime duplicate = TestEquivalenceClass1();
EXPECT_FALSE(db().Store(duplicate));
- EXPECT_TRUE(error_ignorer.CheckIgnoredErrors());
+ EXPECT_TRUE(expecter.SawExpectedErrors());
}
// Verify that intersecting equivalence classes are not allowed to be stored.
{
- sql::ScopedErrorIgnorer error_ignorer;
- error_ignorer.IgnoreError(SQLITE_CONSTRAINT);
+ sql::test::ScopedErrorExpecter expecter;
+ expecter.ExpectError(SQLITE_CONSTRAINT);
AffiliatedFacetsWithUpdateTime intersecting;
intersecting.facets.push_back(FacetURI::FromCanonicalSpec(kTestFacetURI3));
intersecting.facets.push_back(FacetURI::FromCanonicalSpec(kTestFacetURI4));
EXPECT_FALSE(db().Store(intersecting));
- EXPECT_TRUE(error_ignorer.CheckIgnoredErrors());
+ EXPECT_TRUE(expecter.SawExpectedErrors());
}
}
« no previous file with comments | « components/password_manager/core/browser/affiliation_database.cc ('k') | content/browser/appcache/appcache_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698