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

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

Issue 1853333003: [BlobAsync] Faster shortcuttin, make renderer controller leaky & alive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/blob_storage/blob_async_builder_host_unittest.cc
diff --git a/content/browser/blob_storage/blob_async_builder_host_unittest.cc b/content/browser/blob_storage/blob_async_builder_host_unittest.cc
index 4086a90b69afe399cd9f4275d3eb253983b3c3ee..d40cc7cbc0cdd9b92979466a1b3fbf4bf0c12f79 100644
--- a/content/browser/blob_storage/blob_async_builder_host_unittest.cc
+++ b/content/browser/blob_storage/blob_async_builder_host_unittest.cc
@@ -526,20 +526,9 @@ TEST_F(BlobAsyncBuilderHostTest, IncorrectBlobDependencies) {
// The first blob shouldn't be building anymore.
EXPECT_FALSE(host_.IsBeingBuilt(kBlob1));
- // Test we get BAD_IPC.
- std::vector<DataElement> descriptions;
- AddShortcutMemoryItem(2, &descriptions);
- DataElement element;
- element.SetToBlob(kBlob1);
- descriptions.push_back(element);
- EXPECT_EQ(BlobTransportResult::BAD_IPC,
- host_.StartBuildingBlob(
- kBlob1, descriptions, 2, &context_,
- base::Bind(&BlobAsyncBuilderHostTest::RequestMemoryCallback,
- base::Unretained(this))));
// Try to finish the second one, without a reference to the first.
- descriptions.clear();
+ std::vector<DataElement> descriptions;
AddShortcutMemoryItem(2, &descriptions);
EXPECT_EQ(BlobTransportResult::BAD_IPC,
host_.StartBuildingBlob(
@@ -551,6 +540,7 @@ TEST_F(BlobAsyncBuilderHostTest, IncorrectBlobDependencies) {
// Try to finish the third one with the reference we didn't declare earlier.
descriptions.clear();
AddShortcutMemoryItem(2, &descriptions);
+ DataElement element;
element.SetToBlob(kGoodBlob);
descriptions.push_back(element);
EXPECT_EQ(BlobTransportResult::BAD_IPC,
@@ -620,21 +610,6 @@ TEST_F(BlobAsyncBuilderHostTest, BlobBreaksWhenReferenceBroken) {
EXPECT_FALSE(host_.IsBeingBuilt(kBlob2));
EXPECT_FALSE(IsBeingBuiltInContext(kBlob2));
EXPECT_TRUE(context_.GetBlobDataFromUUID(kBlob2)->IsBroken());
-
- // Try to finish the second one, but we should get a BAD_IPC, as we are no
- // longer being constructed.
- std::vector<DataElement> descriptions;
- AddShortcutMemoryItem(2, &descriptions);
- DataElement element;
- element.SetToBlob(kBlob1);
- descriptions.push_back(element);
- EXPECT_EQ(BlobTransportResult::BAD_IPC,
- host_.StartBuildingBlob(
- kBlob2, descriptions, 2, &context_,
- base::Bind(&BlobAsyncBuilderHostTest::RequestMemoryCallback,
- base::Unretained(this))));
- EXPECT_FALSE(request_called_);
- EXPECT_TRUE(context_.GetBlobDataFromUUID(kBlob2)->IsBroken());
};
} // namespace storage

Powered by Google App Engine
This is Rietveld 408576698