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

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

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small cleanup Created 7 years 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: content/browser/indexed_db/indexed_db_factory_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc
index 859c2b722dc9f9e35c0647896409eb49f31da19c..60e8dcc6fb67806fb8e75a7a68d19f0e9b5a3edd 100644
--- a/content/browser/indexed_db/indexed_db_factory_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc
@@ -47,9 +47,11 @@ class MockIDBFactory : public IndexedDBFactory {
scoped_refptr<IndexedDBBackingStore> backing_store =
OpenBackingStore(origin,
data_directory,
+ NULL, /* request_context */
&data_loss,
&data_loss_message,
- &disk_full);
+ &disk_full,
+ NULL /* TaskRunner */);
EXPECT_EQ(blink::WebIDBDataLossNone, data_loss);
return backing_store;
}
@@ -187,9 +189,11 @@ class DiskFullFactory : public IndexedDBFactory {
virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStore(
const GURL& origin_url,
const base::FilePath& data_directory,
+ net::URLRequestContext* request_context,
blink::WebIDBDataLoss* data_loss,
std::string* data_loss_message,
- bool* disk_full) OVERRIDE {
+ bool* disk_full,
+ base::TaskRunner* task_runner) OVERRIDE {
*disk_full = true;
return scoped_refptr<IndexedDBBackingStore>();
}
@@ -211,6 +215,8 @@ class LookingForQuotaErrorMockCallbacks : public IndexedDBCallbacks {
TEST_F(IndexedDBFactoryTest, QuotaErrorOnDiskFull) {
const GURL origin("http://localhost:81");
+ base::ScopedTempDir temp_directory;
+ ASSERT_TRUE(temp_directory.CreateUniqueTempDir());
scoped_refptr<DiskFullFactory> factory = new DiskFullFactory;
scoped_refptr<LookingForQuotaErrorMockCallbacks> callbacks =
@@ -220,11 +226,14 @@ TEST_F(IndexedDBFactoryTest, QuotaErrorOnDiskFull) {
const string16 name(ASCIIToUTF16("name"));
factory->Open(name,
1, /* version */
+ NULL, /* request_context */
2, /* transaction_id */
callbacks,
dummy_database_callbacks,
origin,
- base::FilePath(FILE_PATH_LITERAL("/dummy")));
+ temp_directory.path(),
+ 0, /* child_process_id */
+ NULL /* task_runner */);
}
TEST_F(IndexedDBFactoryTest, BackingStoreReleasedOnForcedClose) {
@@ -241,11 +250,14 @@ TEST_F(IndexedDBFactoryTest, BackingStoreReleasedOnForcedClose) {
const int64 transaction_id = 1;
factory->Open(ASCIIToUTF16("db"),
IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION,
+ NULL, /* request_context */
transaction_id,
callbacks,
db_callbacks,
origin,
- temp_directory.path());
+ temp_directory.path(),
+ 0, /* child_process_id */
+ NULL /* task_runner */);
EXPECT_TRUE(callbacks->connection());
@@ -268,11 +280,14 @@ TEST_F(IndexedDBFactoryTest, BackingStoreReleaseDelayedOnClose) {
const int64 transaction_id = 1;
factory->Open(ASCIIToUTF16("db"),
IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION,
+ NULL, /* request_context */
transaction_id,
callbacks,
db_callbacks,
origin,
- temp_directory.path());
+ temp_directory.path(),
+ 0, /* child_process_id */
+ NULL /* task_runner */);
EXPECT_TRUE(callbacks->connection());
IndexedDBBackingStore* store =

Powered by Google App Engine
This is Rietveld 408576698