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

Unified Diff: content/child/blob_storage/blob_transport_controller_unittest.cc

Issue 2086033002: [BlobAsync] Fixed shared memory mapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 6 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
« no previous file with comments | « content/child/blob_storage/blob_transport_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blob_storage/blob_transport_controller_unittest.cc
diff --git a/content/child/blob_storage/blob_transport_controller_unittest.cc b/content/child/blob_storage/blob_transport_controller_unittest.cc
index c527a047800cebbec3d10ab793fa53df09d7893f..6735742786101e84e1b990920f0abab6874389c6 100644
--- a/content/child/blob_storage/blob_transport_controller_unittest.cc
+++ b/content/child/blob_storage/blob_transport_controller_unittest.cc
@@ -302,7 +302,7 @@ TEST_F(BlobTransportControllerTest, SharedMemory) {
requests.push_back(
BlobItemBytesRequest::CreateSharedMemoryRequest(1, 3, 0, 6, 0, 11));
base::SharedMemory memory;
- memory.CreateAndMapAnonymous(11 + 6);
+ memory.CreateAnonymous(11 + 6);
base::SharedMemoryHandle handle =
base::SharedMemory::DuplicateHandle(memory.handle());
CHECK(base::SharedMemory::NULLHandle() != handle);
@@ -314,6 +314,7 @@ TEST_F(BlobTransportControllerTest, SharedMemory) {
expected.push_back(BlobItemBytesResponse(1));
ExpectMemoryResponses(kBlobUUID, expected);
std::string expected_memory = "HelloHello2Hello3";
+ memory.Map(11 + 6);
const char* mem_location = static_cast<const char*>(memory.memory());
std::vector<char> value(mem_location, mem_location + memory.requested_size());
EXPECT_THAT(value, testing::ElementsAreArray(expected_memory.c_str(),
« no previous file with comments | « content/child/blob_storage/blob_transport_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698