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

Unified Diff: cc/resources/scoped_resource_unittest.cc

Issue 652583002: remove unused Leak() function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed test code Created 6 years, 2 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 | « cc/resources/scoped_resource.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/scoped_resource_unittest.cc
diff --git a/cc/resources/scoped_resource_unittest.cc b/cc/resources/scoped_resource_unittest.cc
index 04d63291f04b43034d85850015d13518510a93d0..7c7e05557554c6ab29f90e74e837f5f0bececa71 100644
--- a/cc/resources/scoped_resource_unittest.cc
+++ b/cc/resources/scoped_resource_unittest.cc
@@ -112,43 +112,5 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted) {
}
}
-TEST(ScopedResourceTest, LeakScopedResource) {
- FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
- CHECK(output_surface->BindToClient(&output_surface_client));
-
- scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
- new TestSharedBitmapManager());
- scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(output_surface.get(),
- shared_bitmap_manager.get(),
- NULL,
- NULL,
- 0,
- false,
- 1,
- false));
- {
- scoped_ptr<ScopedResource> texture =
- ScopedResource::Create(resource_provider.get());
-
- EXPECT_EQ(0u, resource_provider->num_resources());
- texture->Allocate(
- gfx::Size(30, 30), ResourceProvider::TextureHintImmutable, RGBA_8888);
- EXPECT_LT(0u, texture->id());
- EXPECT_EQ(1u, resource_provider->num_resources());
-
- texture->Leak();
- EXPECT_EQ(0u, texture->id());
- EXPECT_EQ(1u, resource_provider->num_resources());
-
- texture->Free();
- EXPECT_EQ(0u, texture->id());
- EXPECT_EQ(1u, resource_provider->num_resources());
- }
-
- EXPECT_EQ(1u, resource_provider->num_resources());
-}
-
} // namespace
} // namespace cc
« no previous file with comments | « cc/resources/scoped_resource.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698