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

Unified Diff: cc/resources/scoped_resource_unittest.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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
« no previous file with comments | « cc/resources/scoped_resource.h ('k') | cc/resources/scoped_ui_resource.h » ('j') | 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 1133f2108e14b42eeb1e81a07267e72cf8145f41..a7811d0859eff1251a6721027860410fb0871ae0 100644
--- a/cc/resources/scoped_resource_unittest.cc
+++ b/cc/resources/scoped_resource_unittest.cc
@@ -18,14 +18,15 @@ namespace {
TEST(ScopedResourceTest, NewScopedResource) {
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+ std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
CHECK(output_surface->BindToClient(&output_surface_client));
- scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+ std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
new TestSharedBitmapManager());
- scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
- output_surface.get(), shared_bitmap_manager.get());
- scoped_ptr<ScopedResource> texture =
+ std::unique_ptr<ResourceProvider> resource_provider =
+ FakeResourceProvider::Create(output_surface.get(),
+ shared_bitmap_manager.get());
+ std::unique_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
// New scoped textures do not hold a texture yet.
@@ -39,14 +40,15 @@ TEST(ScopedResourceTest, NewScopedResource) {
TEST(ScopedResourceTest, CreateScopedResource) {
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+ std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
CHECK(output_surface->BindToClient(&output_surface_client));
- scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+ std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
new TestSharedBitmapManager());
- scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
- output_surface.get(), shared_bitmap_manager.get());
- scoped_ptr<ScopedResource> texture =
+ std::unique_ptr<ResourceProvider> resource_provider =
+ FakeResourceProvider::Create(output_surface.get(),
+ shared_bitmap_manager.get());
+ std::unique_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
texture->Allocate(gfx::Size(30, 30), ResourceProvider::TEXTURE_HINT_IMMUTABLE,
RGBA_8888);
@@ -63,15 +65,16 @@ TEST(ScopedResourceTest, CreateScopedResource) {
TEST(ScopedResourceTest, ScopedResourceIsDeleted) {
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+ std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
CHECK(output_surface->BindToClient(&output_surface_client));
- scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+ std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
new TestSharedBitmapManager());
- scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
- output_surface.get(), shared_bitmap_manager.get());
+ std::unique_ptr<ResourceProvider> resource_provider =
+ FakeResourceProvider::Create(output_surface.get(),
+ shared_bitmap_manager.get());
{
- scoped_ptr<ScopedResource> texture =
+ std::unique_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
EXPECT_EQ(0u, resource_provider->num_resources());
@@ -83,7 +86,7 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted) {
EXPECT_EQ(0u, resource_provider->num_resources());
{
- scoped_ptr<ScopedResource> texture =
+ std::unique_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
EXPECT_EQ(0u, resource_provider->num_resources());
texture->Allocate(gfx::Size(30, 30),
« no previous file with comments | « cc/resources/scoped_resource.h ('k') | cc/resources/scoped_ui_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698