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

Unified Diff: cc/scoped_resource_unittest.cc

Issue 11412022: Switched cc::Resource and cc::ScopedResource to Chrome coding style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit tests. Created 8 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
« no previous file with comments | « cc/scoped_resource.cc ('k') | cc/texture_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scoped_resource_unittest.cc
diff --git a/cc/scoped_resource_unittest.cc b/cc/scoped_resource_unittest.cc
index 9c24c7c408398e7b5bd35649f05847a2e6d79462..ddf583a4d0245acf4e520efee762a8feabfc640b 100644
--- a/cc/scoped_resource_unittest.cc
+++ b/cc/scoped_resource_unittest.cc
@@ -34,7 +34,7 @@ TEST(ScopedResourceTest, CreateScopedResource)
scoped_ptr<GraphicsContext> context(createFakeGraphicsContext());
scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::create(context.get()));
scoped_ptr<ScopedResource> texture = ScopedResource::create(resourceProvider.get());
- texture->allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
+ texture->Allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
// The texture has an allocated byte-size now.
size_t expectedBytes = 30 * 30 * 4;
@@ -54,7 +54,7 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted)
scoped_ptr<ScopedResource> texture = ScopedResource::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
+ texture->Allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
}
@@ -64,10 +64,10 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted)
{
scoped_ptr<ScopedResource> texture = ScopedResource::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
+ texture->Allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
- texture->free();
+ texture->Free();
EXPECT_EQ(0u, resourceProvider->numResources());
}
}
@@ -81,15 +81,15 @@ TEST(ScopedResourceTest, LeakScopedResource)
scoped_ptr<ScopedResource> texture = ScopedResource::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
+ texture->Allocate(Renderer::ImplPool, gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
- texture->leak();
+ texture->Leak();
EXPECT_EQ(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
- texture->free();
+ texture->Free();
EXPECT_EQ(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
}
« no previous file with comments | « cc/scoped_resource.cc ('k') | cc/texture_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698