OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 #include "webrtc/base/gunit.h" | 10 #include "webrtc/base/gunit.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 // Test that Win32Socket::Pump does not touch general Windows messages. | 25 // Test that Win32Socket::Pump does not touch general Windows messages. |
26 TEST(Win32SocketServerTest, TestPump) { | 26 TEST(Win32SocketServerTest, TestPump) { |
27 Win32SocketServer server(NULL); | 27 Win32SocketServer server(NULL); |
28 SocketServerScope scope(&server); | 28 SocketServerScope scope(&server); |
29 EXPECT_EQ(TRUE, PostMessage(NULL, WM_USER, 999, 0)); | 29 EXPECT_EQ(TRUE, PostMessage(NULL, WM_USER, 999, 0)); |
30 server.Pump(); | 30 server.Pump(); |
31 MSG msg; | 31 MSG msg; |
32 EXPECT_EQ(TRUE, PeekMessage(&msg, NULL, WM_USER, 0, PM_REMOVE)); | 32 EXPECT_EQ(TRUE, PeekMessage(&msg, NULL, WM_USER, 0, PM_REMOVE)); |
33 EXPECT_EQ(static_cast<UINT>(WM_USER), msg.message); | 33 EXPECT_EQ(WM_USER, msg.message); |
34 EXPECT_EQ(999u, msg.wParam); | 34 EXPECT_EQ(999, msg.wParam); |
35 } | 35 } |
36 | 36 |
37 // Test that Win32Socket passes all the generic Socket tests. | 37 // Test that Win32Socket passes all the generic Socket tests. |
38 class Win32SocketTest : public SocketTest { | 38 class Win32SocketTest : public SocketTest { |
39 protected: | 39 protected: |
40 Win32SocketTest() : server_(NULL), scope_(&server_) {} | 40 Win32SocketTest() : server_(NULL), scope_(&server_) {} |
41 Win32SocketServer server_; | 41 Win32SocketServer server_; |
42 SocketServerScope scope_; | 42 SocketServerScope scope_; |
43 }; | 43 }; |
44 | 44 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 TEST_F(Win32SocketTest, TestGetSetOptionsIPv4) { | 149 TEST_F(Win32SocketTest, TestGetSetOptionsIPv4) { |
150 SocketTest::TestGetSetOptionsIPv4(); | 150 SocketTest::TestGetSetOptionsIPv4(); |
151 } | 151 } |
152 | 152 |
153 TEST_F(Win32SocketTest, TestGetSetOptionsIPv6) { | 153 TEST_F(Win32SocketTest, TestGetSetOptionsIPv6) { |
154 SocketTest::TestGetSetOptionsIPv6(); | 154 SocketTest::TestGetSetOptionsIPv6(); |
155 } | 155 } |
156 | 156 |
157 } // namespace rtc | 157 } // namespace rtc |
OLD | NEW |