| 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" |
| 11 #include "webrtc/base/socket_unittest.h" | 11 #include "webrtc/base/socket_unittest.h" |
| 12 #include "webrtc/base/thread.h" | 12 #include "webrtc/base/thread.h" |
| 13 #include "webrtc/base/win32socketserver.h" | 13 #include "webrtc/base/win32socketserver.h" |
| 14 | 14 |
| 15 namespace rtc { | 15 namespace rtc { |
| 16 | 16 |
| 17 // Test that Win32SocketServer::Wait works as expected. | 17 // Test that Win32SocketServer::Wait works as expected. |
| 18 TEST(Win32SocketServerTest, TestWait) { | 18 TEST(Win32SocketServerTest, TestWait) { |
| 19 Win32SocketServer server(NULL); | 19 Win32SocketServer server(NULL); |
| 20 uint32 start = Time(); | 20 uint32_t start = Time(); |
| 21 server.Wait(1000, true); | 21 server.Wait(1000, true); |
| 22 EXPECT_GE(TimeSince(start), 1000); | 22 EXPECT_GE(TimeSince(start), 1000); |
| 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(); |
| (...skipping 117 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 |