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

Unified Diff: mojo/edk/system/shared_buffer_dispatcher_unittest.cc

Issue 1350183002: EDK: More scoped_ptr -> std::unique_ptr conversions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: gah Created 5 years, 3 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 | « mojo/edk/system/shared_buffer_dispatcher.cc ('k') | mojo/edk/system/transport_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/shared_buffer_dispatcher_unittest.cc
diff --git a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc
index 35c9d2e41a267167e2044961855897b0e0fb1974..35bc16ad8a49dae0cb062dbf9593272dd7deba6f 100644
--- a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc
+++ b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc
@@ -122,7 +122,7 @@ TEST_F(SharedBufferDispatcherTest, CreateAndMapBuffer) {
EXPECT_EQ(Dispatcher::Type::SHARED_BUFFER, dispatcher->GetType());
// Make a couple of mappings.
- scoped_ptr<embedder::PlatformSharedBufferMapping> mapping1;
+ std::unique_ptr<embedder::PlatformSharedBufferMapping> mapping1;
EXPECT_EQ(MOJO_RESULT_OK, dispatcher->MapBuffer(
0, 100, MOJO_MAP_BUFFER_FLAG_NONE, &mapping1));
ASSERT_TRUE(mapping1);
@@ -131,7 +131,7 @@ TEST_F(SharedBufferDispatcherTest, CreateAndMapBuffer) {
// Write something.
static_cast<char*>(mapping1->GetBase())[50] = 'x';
- scoped_ptr<embedder::PlatformSharedBufferMapping> mapping2;
+ std::unique_ptr<embedder::PlatformSharedBufferMapping> mapping2;
EXPECT_EQ(MOJO_RESULT_OK, dispatcher->MapBuffer(
50, 50, MOJO_MAP_BUFFER_FLAG_NONE, &mapping2));
ASSERT_TRUE(mapping2);
@@ -155,7 +155,7 @@ TEST_F(SharedBufferDispatcherTest, DuplicateBufferHandle) {
100, &dispatcher1));
// Map and write something.
- scoped_ptr<embedder::PlatformSharedBufferMapping> mapping;
+ std::unique_ptr<embedder::PlatformSharedBufferMapping> mapping;
EXPECT_EQ(MOJO_RESULT_OK, dispatcher1->MapBuffer(
0, 100, MOJO_MAP_BUFFER_FLAG_NONE, &mapping));
static_cast<char*>(mapping->GetBase())[0] = 'x';
@@ -258,7 +258,7 @@ TEST_F(SharedBufferDispatcherTest, MapBufferInvalidArguments) {
SharedBufferDispatcher::kDefaultCreateOptions,
100, &dispatcher));
- scoped_ptr<embedder::PlatformSharedBufferMapping> mapping;
+ std::unique_ptr<embedder::PlatformSharedBufferMapping> mapping;
EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT,
dispatcher->MapBuffer(0, 101, MOJO_MAP_BUFFER_FLAG_NONE, &mapping));
EXPECT_FALSE(mapping);
« no previous file with comments | « mojo/edk/system/shared_buffer_dispatcher.cc ('k') | mojo/edk/system/transport_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698