| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/public/platform/native/platform_handle_private.h" | 5 #include "mojo/public/platform/native/platform_handle_private.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| 11 #include "mojo/public/cpp/application/application_impl.h" | |
| 12 #include "mojo/public/cpp/application/application_test_base.h" | 11 #include "mojo/public/cpp/application/application_test_base.h" |
| 13 #include "mojo/public/cpp/environment/logging.h" | 12 #include "mojo/public/cpp/environment/logging.h" |
| 14 #include "mojo/public/cpp/system/macros.h" | 13 #include "mojo/public/cpp/system/macros.h" |
| 15 | 14 |
| 16 namespace mojo { | 15 namespace mojo { |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 class PlatformHandlePrivateApplicationTest : public test::ApplicationTestBase { | 18 class PlatformHandlePrivateApplicationTest : public test::ApplicationTestBase { |
| 20 public: | 19 public: |
| 21 PlatformHandlePrivateApplicationTest() : ApplicationTestBase() {} | 20 PlatformHandlePrivateApplicationTest() : ApplicationTestBase() {} |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 EXPECT_EQ(bytes_read, bytes_written); | 56 EXPECT_EQ(bytes_read, bytes_written); |
| 58 EXPECT_EQ(write_buffer, read_buffer); | 57 EXPECT_EQ(write_buffer, read_buffer); |
| 59 | 58 |
| 60 EXPECT_EQ(0, close(pipe_fds[0])); | 59 EXPECT_EQ(0, close(pipe_fds[0])); |
| 61 EXPECT_EQ(0, close(unwrapped_handle)); | 60 EXPECT_EQ(0, close(unwrapped_handle)); |
| 62 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(wrapper)); | 61 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(wrapper)); |
| 63 } | 62 } |
| 64 | 63 |
| 65 } // namespace | 64 } // namespace |
| 66 } // namespace mojo | 65 } // namespace mojo |
| OLD | NEW |