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

Unified Diff: content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc

Issue 26045002: Don't reset the database when there was an I/O error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change to IsIOError Created 7 years, 2 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | third_party/leveldatabase/env_chromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
index 6b60a4f9291a2c1b2547823afb15516133cbbab0..a848090865b38d745cadb31ce3ea02bcbfef3050 100644
--- a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
@@ -79,6 +79,8 @@ TEST(IndexedDBIOErrorTest, CleanUpTest) {
&mock_leveldb_factory);
}
+// TODO(dgrogan): Remove expect_destroy if we end up not using it again. It is
+// currently set to false in all 4 calls below.
template <class T>
class MockErrorLevelDBFactory : public LevelDBFactory {
public:
@@ -138,7 +140,7 @@ TEST(IndexedDBNonRecoverableIOErrorTest, NuancedCleanupTest) {
&disk_full,
&mock_leveldb_factory2);
- MockErrorLevelDBFactory<int> mock_leveldb_factory3(EIO, true);
+ MockErrorLevelDBFactory<int> mock_leveldb_factory3(EIO, false);
scoped_refptr<IndexedDBBackingStore> backing_store3 =
IndexedDBBackingStore::Open(origin_identifier,
path,
@@ -148,7 +150,7 @@ TEST(IndexedDBNonRecoverableIOErrorTest, NuancedCleanupTest) {
&mock_leveldb_factory3);
MockErrorLevelDBFactory<base::PlatformFileError> mock_leveldb_factory4(
- base::PLATFORM_FILE_ERROR_FAILED, true);
+ base::PLATFORM_FILE_ERROR_FAILED, false);
scoped_refptr<IndexedDBBackingStore> backing_store4 =
IndexedDBBackingStore::Open(origin_identifier,
path,
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | third_party/leveldatabase/env_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698