| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/pepper/pepper_broker.h" | 5 #include "content/renderer/pepper/pepper_broker.h" |
| 6 #include "base/message_loop/message_loop.h" |
| 6 | 7 |
| 7 #if defined(OS_POSIX) | 8 #if defined(OS_POSIX) |
| 8 #include <fcntl.h> | 9 #include <fcntl.h> |
| 9 #include <sys/socket.h> | 10 #include <sys/socket.h> |
| 10 #endif // defined(OS_POSIX) | 11 #endif // defined(OS_POSIX) |
| 11 | 12 |
| 12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 13 #include "content/test/mock_render_process.h" | 14 #include "content/test/mock_render_process.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 39 // On valid ChannelHandle, initialization should succeed. | 40 // On valid ChannelHandle, initialization should succeed. |
| 40 TEST_F(PepperBrokerTest, InitSuccess) { | 41 TEST_F(PepperBrokerTest, InitSuccess) { |
| 41 PepperBrokerDispatcherWrapper dispatcher_wrapper; | 42 PepperBrokerDispatcherWrapper dispatcher_wrapper; |
| 42 mojo::MessagePipe pipe; | 43 mojo::MessagePipe pipe; |
| 43 IPC::ChannelHandle valid_channel(pipe.handle0.release()); | 44 IPC::ChannelHandle valid_channel(pipe.handle0.release()); |
| 44 | 45 |
| 45 EXPECT_TRUE(dispatcher_wrapper.Init(base::kNullProcessId, valid_channel)); | 46 EXPECT_TRUE(dispatcher_wrapper.Init(base::kNullProcessId, valid_channel)); |
| 46 } | 47 } |
| 47 | 48 |
| 48 } // namespace content | 49 } // namespace content |
| OLD | NEW |