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

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

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/indexed_db/indexed_db_database.h" 5 #include "content/browser/indexed_db/indexed_db_database.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 db_->CreateObjectStore(transaction_->id(), 385 db_->CreateObjectStore(transaction_->id(),
386 store_id, 386 store_id,
387 ASCIIToUTF16("store"), 387 ASCIIToUTF16("store"),
388 IndexedDBKeyPath(), 388 IndexedDBKeyPath(),
389 false /*auto_increment*/); 389 false /*auto_increment*/);
390 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); 390 EXPECT_EQ(1ULL, db_->metadata().object_stores.size());
391 391
392 392
393 // Put is asynchronous 393 // Put is asynchronous
394 IndexedDBValue value("value1", std::vector<IndexedDBBlobInfo>()); 394 IndexedDBValue value("value1", std::vector<IndexedDBBlobInfo>());
395 ScopedVector<webkit_blob::BlobDataHandle> handles; 395 ScopedVector<storage::BlobDataHandle> handles;
396 scoped_ptr<IndexedDBKey> key(new IndexedDBKey("key")); 396 scoped_ptr<IndexedDBKey> key(new IndexedDBKey("key"));
397 std::vector<IndexedDBDatabase::IndexKeys> index_keys; 397 std::vector<IndexedDBDatabase::IndexKeys> index_keys;
398 scoped_refptr<MockIndexedDBCallbacks> request( 398 scoped_refptr<MockIndexedDBCallbacks> request(
399 new MockIndexedDBCallbacks(false)); 399 new MockIndexedDBCallbacks(false));
400 db_->Put(transaction_->id(), 400 db_->Put(transaction_->id(),
401 store_id, 401 store_id,
402 &value, 402 &value,
403 &handles, 403 &handles,
404 key.Pass(), 404 key.Pass(),
405 blink::WebIDBPutModeAddOnly, 405 blink::WebIDBPutModeAddOnly,
406 request, 406 request,
407 index_keys); 407 index_keys);
408 408
409 // Deletion is asynchronous. 409 // Deletion is asynchronous.
410 db_->DeleteObjectStore(transaction_->id(), 410 db_->DeleteObjectStore(transaction_->id(),
411 store_id); 411 store_id);
412 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); 412 EXPECT_EQ(1ULL, db_->metadata().object_stores.size());
413 413
414 // This will execute the Put then Delete. 414 // This will execute the Put then Delete.
415 RunPostedTasks(); 415 RunPostedTasks();
416 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); 416 EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
417 417
418 transaction_->Commit(); // Cleans up the object hierarchy. 418 transaction_->Commit(); // Cleans up the object hierarchy.
419 } 419 }
420 420
421 } // namespace content 421 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.cc ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698