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

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

Issue 932143003: IndexedDB: Report QuotaExceededError when commit fails due to disk full (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move IndexedDBDatabaseError impl to cc file Created 5 years, 10 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 | « no previous file | content/browser/indexed_db/indexed_db_database_error.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_browsertest.cc
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index e2b419aaae1fbd4a4e43929fbe929390bc97ed30..81cd9c0be738dc1b5400c6b4b6258f42cf387054 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -441,6 +441,35 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteForOriginDeletesBlobs) {
EXPECT_EQ(0, RequestDiskUsage());
}
+IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DiskFullOnCommit) {
+ // Ignore several preceding transactions:
+ // * The test calls deleteDatabase() which opens the backing store:
+ // #1: IndexedDBBackingStore::OpenBackingStore
+ // => IndexedDBBackingStore::SetUpMetadata
+ // #2: IndexedDBBackingStore::OpenBackingStore
+ // => IndexedDBBackingStore::CleanUpBlobJournal (no-op)
+ // * Then deletes the database:
+ // #3: IndexedDBFactoryImpl::DeleteDatabase
+ // => IndexedDBDatabase::Create
+ // => IndexedDBBackingStore::CreateIDBDatabaseMetaData
+ // #4: IndexedDBFactoryImpl::DeleteDatabase
+ // => IndexedDBDatabase::DeleteDatabase
+ // => IndexedDBBackingStore::DeleteDatabase
+ // => IndexedDBBackingStore::CleanUpBlobJournal (no-op)
+ // * The test calls open(), to create a new database:
+ // #5: IndexedDBFactoryImpl::Open
+ // => IndexedDBDatabase::Create
+ // => IndexedDBBackingStore::CreateIDBDatabaseMetaData
+ // #6: IndexedDBTransaction::Commit - initial "versionchange" transaction
+ // * Once the connection is opened, the test runs:
+ // #7: IndexedDBTransaction::Commit - the test's "readwrite" transaction)
+ const int instance_num = 7;
+ const int call_num = 1;
+ FailOperation(FAIL_CLASS_LEVELDB_TRANSACTION, FAIL_METHOD_COMMIT_DISK_FULL,
+ instance_num, call_num);
+ SimpleTest(GetTestUrl("indexeddb", "disk_full_on_commit.html"));
+}
+
namespace {
static void CompactIndexedDBBackingStore(
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_database_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698