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

Unified Diff: components/display_compositor/host_shared_bitmap_manager_unittest.cc

Issue 2828353004: Remove HostSharedBitmapManager::AllocateSharedBitmapForChild (Closed)
Patch Set: Created 3 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
« no previous file with comments | « components/display_compositor/host_shared_bitmap_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/display_compositor/host_shared_bitmap_manager_unittest.cc
diff --git a/components/display_compositor/host_shared_bitmap_manager_unittest.cc b/components/display_compositor/host_shared_bitmap_manager_unittest.cc
index e3ea52419fa14a2a493cb1cb968ed36f0389b1e3..dd6bbe9960b09681d0f48efdb8314ab6b590516a 100644
--- a/components/display_compositor/host_shared_bitmap_manager_unittest.cc
+++ b/components/display_compositor/host_shared_bitmap_manager_unittest.cc
@@ -76,31 +76,6 @@ TEST_F(HostSharedBitmapManagerTest, TestCreate) {
shared_bitmap.reset();
}
-TEST_F(HostSharedBitmapManagerTest, TestCreateForChild) {
- gfx::Size bitmap_size(1, 1);
- size_t size_in_bytes;
- EXPECT_TRUE(cc::SharedBitmap::SizeInBytes(bitmap_size, &size_in_bytes));
- cc::SharedBitmapId id = cc::SharedBitmap::GenerateId();
- HostSharedBitmapManagerClient client(manager_.get());
- base::SharedMemoryHandle handle;
- client.AllocateSharedBitmapForChild(base::GetCurrentProcessHandle(),
- size_in_bytes, id, &handle);
-
- EXPECT_TRUE(base::SharedMemory::IsHandleValid(handle));
- std::unique_ptr<base::SharedMemory> bitmap(
- new base::SharedMemory(handle, false));
- EXPECT_TRUE(bitmap->Map(size_in_bytes));
- memset(bitmap->memory(), 0xff, size_in_bytes);
-
- std::unique_ptr<cc::SharedBitmap> shared_bitmap;
- shared_bitmap = manager_->GetSharedBitmapFromId(bitmap_size, id);
- EXPECT_TRUE(shared_bitmap);
- EXPECT_TRUE(
- memcmp(bitmap->memory(), shared_bitmap->pixels(), size_in_bytes) == 0);
-
- client.DidDeleteSharedBitmap(id);
-}
-
TEST_F(HostSharedBitmapManagerTest, RemoveProcess) {
gfx::Size bitmap_size(1, 1);
size_t size_in_bytes;
« no previous file with comments | « components/display_compositor/host_shared_bitmap_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698