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 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
10 #endif // defined(OS_POSIX) | 10 #endif // defined(OS_POSIX) |
11 | 11 |
| 12 #include "build/build_config.h" |
12 #include "content/test/mock_render_process.h" | 13 #include "content/test/mock_render_process.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 class PepperBrokerTest : public ::testing::Test { | 18 class PepperBrokerTest : public ::testing::Test { |
18 protected: | 19 protected: |
19 base::MessageLoopForIO message_loop_; | 20 base::MessageLoopForIO message_loop_; |
20 // We need a render process for ppapi::proxy::ProxyChannel to work. | 21 // We need a render process for ppapi::proxy::ProxyChannel to work. |
21 MockRenderProcess mock_process_; | 22 MockRenderProcess mock_process_; |
(...skipping 29 matching lines...) Expand all Loading... |
51 #endif // defined(OS_POSIX)); | 52 #endif // defined(OS_POSIX)); |
52 | 53 |
53 EXPECT_TRUE(dispatcher_wrapper.Init(base::kNullProcessId, valid_channel)); | 54 EXPECT_TRUE(dispatcher_wrapper.Init(base::kNullProcessId, valid_channel)); |
54 | 55 |
55 #if defined(OS_POSIX) | 56 #if defined(OS_POSIX) |
56 EXPECT_EQ(0, ::close(fds[0])); | 57 EXPECT_EQ(0, ::close(fds[0])); |
57 #endif // defined(OS_POSIX)); | 58 #endif // defined(OS_POSIX)); |
58 } | 59 } |
59 | 60 |
60 } // namespace content | 61 } // namespace content |
OLD | NEW |