| Index: third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
|
| diff --git a/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc b/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
|
| index 4927b4b8745cf6468f848c4bb039c66b16e57886..3bd3f4facf3ff5e6cf2334fd63da03f0769b869d 100644
|
| --- a/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
|
| +++ b/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
|
| @@ -12,8 +12,8 @@
|
| #include <sys/types.h>
|
| #include <sys/uio.h>
|
| #include <unistd.h>
|
| -
|
| #include <deque>
|
| +#include <utility>
|
|
|
| #include "base/files/scoped_file.h"
|
| #include "base/logging.h"
|
| @@ -83,8 +83,8 @@ class PlatformChannelPairPosixTest : public testing::Test {
|
|
|
| TEST_F(PlatformChannelPairPosixTest, NoSigPipe) {
|
| PlatformChannelPair channel_pair;
|
| - ScopedPlatformHandle server_handle = channel_pair.PassServerHandle().Pass();
|
| - ScopedPlatformHandle client_handle = channel_pair.PassClientHandle().Pass();
|
| + ScopedPlatformHandle server_handle = channel_pair.PassServerHandle();
|
| + ScopedPlatformHandle client_handle = channel_pair.PassClientHandle();
|
|
|
| // Write to the client.
|
| static const char kHello[] = "hello";
|
| @@ -124,8 +124,8 @@ TEST_F(PlatformChannelPairPosixTest, NoSigPipe) {
|
|
|
| TEST_F(PlatformChannelPairPosixTest, SendReceiveData) {
|
| PlatformChannelPair channel_pair;
|
| - ScopedPlatformHandle server_handle = channel_pair.PassServerHandle().Pass();
|
| - ScopedPlatformHandle client_handle = channel_pair.PassClientHandle().Pass();
|
| + ScopedPlatformHandle server_handle = channel_pair.PassServerHandle();
|
| + ScopedPlatformHandle client_handle = channel_pair.PassClientHandle();
|
|
|
| for (size_t i = 0; i < 10; i++) {
|
| std::string send_string(1 << i, 'A' + i);
|
| @@ -150,8 +150,8 @@ TEST_F(PlatformChannelPairPosixTest, SendReceiveFDs) {
|
| static const char kHello[] = "hello";
|
|
|
| PlatformChannelPair channel_pair;
|
| - ScopedPlatformHandle server_handle = channel_pair.PassServerHandle().Pass();
|
| - ScopedPlatformHandle client_handle = channel_pair.PassClientHandle().Pass();
|
| + ScopedPlatformHandle server_handle = channel_pair.PassServerHandle();
|
| + ScopedPlatformHandle client_handle = channel_pair.PassClientHandle();
|
|
|
| // Reduce the number of FDs opened on OS X to avoid test flake.
|
| #if defined(OS_MACOSX)
|
| @@ -170,7 +170,7 @@ TEST_F(PlatformChannelPairPosixTest, SendReceiveFDs) {
|
| ASSERT_TRUE(fp);
|
| ASSERT_EQ(j, fwrite(std::string(j, c).data(), 1, j, fp.get()));
|
| platform_handles->push_back(
|
| - test::PlatformHandleFromFILE(fp.Pass()).release());
|
| + test::PlatformHandleFromFILE(std::move(fp)).release());
|
| ASSERT_TRUE(platform_handles->back().is_valid());
|
| }
|
|
|
| @@ -211,8 +211,8 @@ TEST_F(PlatformChannelPairPosixTest, AppendReceivedFDs) {
|
| static const char kHello[] = "hello";
|
|
|
| PlatformChannelPair channel_pair;
|
| - ScopedPlatformHandle server_handle = channel_pair.PassServerHandle().Pass();
|
| - ScopedPlatformHandle client_handle = channel_pair.PassClientHandle().Pass();
|
| + ScopedPlatformHandle server_handle = channel_pair.PassServerHandle();
|
| + ScopedPlatformHandle client_handle = channel_pair.PassClientHandle();
|
|
|
| const std::string file_contents("hello world");
|
|
|
| @@ -223,7 +223,7 @@ TEST_F(PlatformChannelPairPosixTest, AppendReceivedFDs) {
|
| fwrite(file_contents.data(), 1, file_contents.size(), fp.get()));
|
| ScopedPlatformHandleVectorPtr platform_handles(new PlatformHandleVector);
|
| platform_handles->push_back(
|
| - test::PlatformHandleFromFILE(fp.Pass()).release());
|
| + test::PlatformHandleFromFILE(std::move(fp)).release());
|
| ASSERT_TRUE(platform_handles->back().is_valid());
|
|
|
| // Send the FD (+ "hello").
|
|
|