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

Side by Side Diff: webrtc/media/sctp/sctptransport_unittest.cc

Issue 2648233003: Adding ability for BaseChannel to use PacketTransportInterface. (Closed)
Patch Set: Fix TSAN warning in test by starting thread after setting fake clock Created 3 years, 10 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/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/p2p/BUILD.gn » ('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 (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
11 #include <errno.h> 11 #include <errno.h>
12 #include <stdarg.h> 12 #include <stdarg.h>
13 #include <stdio.h> 13 #include <stdio.h>
14 14
15 #include <memory> 15 #include <memory>
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/base/bind.h" 19 #include "webrtc/base/bind.h"
20 #include "webrtc/base/copyonwritebuffer.h" 20 #include "webrtc/base/copyonwritebuffer.h"
21 #include "webrtc/base/criticalsection.h" 21 #include "webrtc/base/criticalsection.h"
22 #include "webrtc/base/gunit.h" 22 #include "webrtc/base/gunit.h"
23 #include "webrtc/base/helpers.h" 23 #include "webrtc/base/helpers.h"
24 #include "webrtc/base/ssladapter.h" 24 #include "webrtc/base/ssladapter.h"
25 #include "webrtc/base/thread.h" 25 #include "webrtc/base/thread.h"
26 #include "webrtc/media/sctp/sctptransport.h" 26 #include "webrtc/media/sctp/sctptransport.h"
27 #include "webrtc/p2p/base/faketransportcontroller.h" 27 #include "webrtc/p2p/base/fakedtlstransport.h"
28 28
29 namespace { 29 namespace {
30 static const int kDefaultTimeout = 10000; // 10 seconds. 30 static const int kDefaultTimeout = 10000; // 10 seconds.
31 // Use ports other than the default 5000 for testing. 31 // Use ports other than the default 5000 for testing.
32 static const int kTransport1Port = 5001; 32 static const int kTransport1Port = 5001;
33 static const int kTransport2Port = 5002; 33 static const int kTransport2Port = 5002;
34 } 34 }
35 35
36 namespace cricket { 36 namespace cricket {
37 37
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 AddStream(1); 554 AddStream(1);
555 ASSERT_TRUE(SendData(transport1(), 1, "hi?", &result)); 555 ASSERT_TRUE(SendData(transport1(), 1, "hi?", &result));
556 EXPECT_EQ(SDR_SUCCESS, result); 556 EXPECT_EQ(SDR_SUCCESS, result);
557 EXPECT_TRUE_WAIT(ReceivedData(receiver2(), 1, "hi?"), kDefaultTimeout); 557 EXPECT_TRUE_WAIT(ReceivedData(receiver2(), 1, "hi?"), kDefaultTimeout);
558 transport1()->ResetStream(1); 558 transport1()->ResetStream(1);
559 EXPECT_TRUE_WAIT(transport2_sig_receiver.StreamCloseCount(1) == 2, 559 EXPECT_TRUE_WAIT(transport2_sig_receiver.StreamCloseCount(1) == 2,
560 kDefaultTimeout); 560 kDefaultTimeout);
561 } 561 }
562 562
563 } // namespace cricket 563 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/p2p/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698