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

Side by Side Diff: content/browser/indexed_db/indexed_db_browsertest.cc

Issue 1071553002: Optimizes the operation of DeleteDatabase when no backing store exists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Optimizes the operation of DeleteDatabase when no backing store exists. Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // => IndexedDBDatabase::DeleteDatabase 500 // => IndexedDBDatabase::DeleteDatabase
501 // => IndexedDBBackingStore::DeleteDatabase 501 // => IndexedDBBackingStore::DeleteDatabase
502 // => IndexedDBBackingStore::CleanUpBlobJournal (no-op) 502 // => IndexedDBBackingStore::CleanUpBlobJournal (no-op)
503 // * The test calls open(), to create a new database: 503 // * The test calls open(), to create a new database:
504 // #5: IndexedDBFactoryImpl::Open 504 // #5: IndexedDBFactoryImpl::Open
505 // => IndexedDBDatabase::Create 505 // => IndexedDBDatabase::Create
506 // => IndexedDBBackingStore::CreateIDBDatabaseMetaData 506 // => IndexedDBBackingStore::CreateIDBDatabaseMetaData
507 // #6: IndexedDBTransaction::Commit - initial "versionchange" transaction 507 // #6: IndexedDBTransaction::Commit - initial "versionchange" transaction
508 // * Once the connection is opened, the test runs: 508 // * Once the connection is opened, the test runs:
509 // #7: IndexedDBTransaction::Commit - the test's "readwrite" transaction) 509 // #7: IndexedDBTransaction::Commit - the test's "readwrite" transaction)
510 const int instance_num = 7; 510 const int instance_num = 5;
511 const int call_num = 1; 511 const int call_num = 1;
512 FailOperation(FAIL_CLASS_LEVELDB_TRANSACTION, FAIL_METHOD_COMMIT_DISK_FULL, 512 FailOperation(FAIL_CLASS_LEVELDB_TRANSACTION, FAIL_METHOD_COMMIT_DISK_FULL,
513 instance_num, call_num); 513 instance_num, call_num);
514 SimpleTest(GetTestUrl("indexeddb", "disk_full_on_commit.html")); 514 SimpleTest(GetTestUrl("indexeddb", "disk_full_on_commit.html"));
515 } 515 }
516 516
517 namespace { 517 namespace {
518 518
519 static void CompactIndexedDBBackingStore( 519 static void CompactIndexedDBBackingStore(
520 scoped_refptr<IndexedDBContextImpl> context, 520 scoped_refptr<IndexedDBContextImpl> context,
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 command_line->AppendSwitch(switches::kSingleProcess); 839 command_line->AppendSwitch(switches::kSingleProcess);
840 } 840 }
841 }; 841 };
842 842
843 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, 843 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess,
844 RenderThreadShutdownTest) { 844 RenderThreadShutdownTest) {
845 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); 845 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html"));
846 } 846 }
847 847
848 } // namespace content 848 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698