Index: mojo/public/cpp/bindings/tests/validation_unittest.cc |
diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc |
index 7153a59ae9e301c63b6352717897189ec1a9b831..d21a73f8f99a75507bb6f7ab90548b903e4210f9 100644 |
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc |
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc |
@@ -3,9 +3,9 @@ |
// found in the LICENSE file. |
#include <stdio.h> |
- |
#include <algorithm> |
#include <string> |
+#include <utility> |
#include <vector> |
#include "base/message_loop/message_loop.h" |
@@ -202,7 +202,7 @@ class ValidationIntegrationTest : public ValidationTest { |
ASSERT_EQ(MOJO_RESULT_OK, |
CreateMessagePipe(nullptr, &tester_endpoint, &testee_endpoint_)); |
test_message_receiver_ = |
- new TestMessageReceiver(this, tester_endpoint.Pass()); |
+ new TestMessageReceiver(this, std::move(tester_endpoint)); |
} |
void TearDown() override { |
@@ -216,7 +216,9 @@ class ValidationIntegrationTest : public ValidationTest { |
MessageReceiver* test_message_receiver() { return test_message_receiver_; } |
- ScopedMessagePipeHandle testee_endpoint() { return testee_endpoint_.Pass(); } |
+ ScopedMessagePipeHandle testee_endpoint() { |
+ return std::move(testee_endpoint_); |
+ } |
private: |
class TestMessageReceiver : public MessageReceiver { |
@@ -224,7 +226,7 @@ class ValidationIntegrationTest : public ValidationTest { |
TestMessageReceiver(ValidationIntegrationTest* owner, |
ScopedMessagePipeHandle handle) |
: owner_(owner), |
- connector_(handle.Pass(), |
+ connector_(std::move(handle), |
mojo::internal::Connector::SINGLE_THREADED_SEND) { |
connector_.set_enforce_errors_from_incoming_receiver(false); |
} |
@@ -418,7 +420,7 @@ TEST_F(ValidationTest, ResponseBoundsCheck) { |
// - X::ResponseValidator_ |
TEST_F(ValidationIntegrationTest, InterfacePtr) { |
IntegrationTestInterfacePtr interface_ptr = MakeProxy( |
- InterfacePtrInfo<IntegrationTestInterface>(testee_endpoint().Pass(), 0u)); |
+ InterfacePtrInfo<IntegrationTestInterface>(testee_endpoint(), 0u)); |
interface_ptr.internal_state()->EnableTestingMode(); |
RunValidationTests("integration_intf_resp", test_message_receiver()); |
@@ -433,7 +435,7 @@ TEST_F(ValidationIntegrationTest, Binding) { |
IntegrationTestInterfaceImpl interface_impl; |
Binding<IntegrationTestInterface> binding( |
&interface_impl, |
- MakeRequest<IntegrationTestInterface>(testee_endpoint().Pass())); |
+ MakeRequest<IntegrationTestInterface>(testee_endpoint())); |
binding.EnableTestingMode(); |
RunValidationTests("integration_intf_rqst", test_message_receiver()); |