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

Unified Diff: content/browser/blob_storage/blob_storage_registry_unittest.cc

Issue 2448353002: [BlobAsync] Moving async handling into BlobStorageContext & quota out. (Closed)
Patch Set: hopefully fixed android/windows compile, and comments Created 4 years, 1 month 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/blob_storage/blob_storage_registry_unittest.cc
diff --git a/content/browser/blob_storage/blob_storage_registry_unittest.cc b/content/browser/blob_storage/blob_storage_registry_unittest.cc
index 918554202b07f2430b1d3930093b6f5a6dc73802..9cb2285f11fc7606a78e56a3694a4f26408b6c56 100644
--- a/content/browser/blob_storage/blob_storage_registry_unittest.cc
+++ b/content/browser/blob_storage/blob_storage_registry_unittest.cc
@@ -5,13 +5,12 @@
#include "storage/browser/blob/blob_storage_registry.h"
#include "base/callback.h"
+#include "storage/browser/blob/blob_entry.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace storage {
namespace {
-using Entry = BlobStorageRegistry::Entry;
-using BlobState = BlobStorageRegistry::BlobState;
TEST(BlobStorageRegistry, UUIDRegistration) {
const std::string kBlob1 = "Blob1";
@@ -22,14 +21,12 @@ TEST(BlobStorageRegistry, UUIDRegistration) {
EXPECT_FALSE(registry.DeleteEntry(kBlob1));
EXPECT_EQ(0u, registry.blob_count());
- Entry* entry = registry.CreateEntry(kBlob1, kType, kDisposition);
+ BlobEntry* entry = registry.CreateEntry(kBlob1, kType, kDisposition);
ASSERT_NE(nullptr, entry);
- EXPECT_EQ(BlobState::PENDING, entry->state);
- EXPECT_EQ(kType, entry->content_type);
- EXPECT_EQ(kDisposition, entry->content_disposition);
- EXPECT_EQ(1u, entry->refcount);
- EXPECT_FALSE(entry->data.get() || entry->data_builder.get());
- EXPECT_EQ(0u, entry->build_completion_callbacks.size());
+ EXPECT_EQ(BlobStatus::PENDING_QUOTA, entry->status());
+ EXPECT_EQ(kType, entry->content_type());
+ EXPECT_EQ(kDisposition, entry->content_disposition());
+ EXPECT_EQ(0u, entry->refcount());
EXPECT_EQ(entry, registry.GetEntry(kBlob1));
EXPECT_TRUE(registry.DeleteEntry(kBlob1));
@@ -52,7 +49,7 @@ TEST(BlobStorageRegistry, URLRegistration) {
EXPECT_FALSE(registry.DeleteURLMapping(kURL, nullptr));
EXPECT_FALSE(registry.CreateUrlMapping(kURL, kBlob));
EXPECT_EQ(0u, registry.url_count());
- Entry* entry = registry.CreateEntry(kBlob, kType, kDisposition);
+ BlobEntry* entry = registry.CreateEntry(kBlob, kType, kDisposition);
EXPECT_FALSE(registry.IsURLMapped(kURL));
EXPECT_TRUE(registry.CreateUrlMapping(kURL, kBlob));

Powered by Google App Engine
This is Rietveld 408576698