Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Side by Side Diff: webrtc/base/thread_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/thread.cc ('k') | webrtc/base/timeutils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 ~SocketClient() { 60 ~SocketClient() {
61 delete socket_; 61 delete socket_;
62 } 62 }
63 63
64 SocketAddress address() const { return socket_->GetLocalAddress(); } 64 SocketAddress address() const { return socket_->GetLocalAddress(); }
65 65
66 void OnPacket(AsyncPacketSocket* socket, const char* buf, size_t size, 66 void OnPacket(AsyncPacketSocket* socket, const char* buf, size_t size,
67 const SocketAddress& remote_addr, 67 const SocketAddress& remote_addr,
68 const PacketTime& packet_time) { 68 const PacketTime& packet_time) {
69 EXPECT_EQ(size, sizeof(uint32)); 69 EXPECT_EQ(size, sizeof(uint32_t));
70 uint32 prev = reinterpret_cast<const uint32*>(buf)[0]; 70 uint32_t prev = reinterpret_cast<const uint32_t*>(buf)[0];
71 uint32 result = Next(prev); 71 uint32_t result = Next(prev);
72 72
73 post_thread_->PostDelayed(200, post_handler_, 0, new TestMessage(result)); 73 post_thread_->PostDelayed(200, post_handler_, 0, new TestMessage(result));
74 } 74 }
75 75
76 private: 76 private:
77 AsyncUDPSocket* socket_; 77 AsyncUDPSocket* socket_;
78 Thread* post_thread_; 78 Thread* post_thread_;
79 MessageHandler* post_handler_; 79 MessageHandler* post_handler_;
80 }; 80 };
81 81
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 }; 713 };
714 714
715 TEST_F(ComThreadTest, ComInited) { 715 TEST_F(ComThreadTest, ComInited) {
716 Thread* thread = new ComThread(); 716 Thread* thread = new ComThread();
717 EXPECT_TRUE(thread->Start()); 717 EXPECT_TRUE(thread->Start());
718 thread->Post(this, 0); 718 thread->Post(this, 0);
719 EXPECT_TRUE_WAIT(done_, 1000); 719 EXPECT_TRUE_WAIT(done_, 1000);
720 delete thread; 720 delete thread;
721 } 721 }
722 #endif 722 #endif
OLDNEW
« no previous file with comments | « webrtc/base/thread.cc ('k') | webrtc/base/timeutils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698