OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "webrtc/base/buffer.h" | 14 #include "webrtc/base/buffer.h" |
15 #include "webrtc/base/gunit.h" | 15 #include "webrtc/base/gunit.h" |
16 #include "webrtc/base/helpers.h" | 16 #include "webrtc/base/helpers.h" |
17 #include "webrtc/base/ssladapter.h" | 17 #include "webrtc/base/ssladapter.h" |
18 #include "webrtc/base/timing.h" | 18 #include "webrtc/base/timing.h" |
19 #include "webrtc/media/base/constants.h" | |
20 #include "webrtc/media/base/fakenetworkinterface.h" | 19 #include "webrtc/media/base/fakenetworkinterface.h" |
| 20 #include "webrtc/media/base/mediaconstants.h" |
21 #include "webrtc/media/base/rtpdataengine.h" | 21 #include "webrtc/media/base/rtpdataengine.h" |
22 #include "webrtc/media/base/rtputils.h" | 22 #include "webrtc/media/base/rtputils.h" |
23 | 23 |
24 class FakeTiming : public rtc::Timing { | 24 class FakeTiming : public rtc::Timing { |
25 public: | 25 public: |
26 FakeTiming() : now_(0.0) {} | 26 FakeTiming() : now_(0.0) {} |
27 | 27 |
28 virtual double TimerNow() { | 28 virtual double TimerNow() { |
29 return now_; | 29 return now_; |
30 } | 30 } |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 0x80, 0x65, 0x00, 0x02 | 451 0x80, 0x65, 0x00, 0x02 |
452 }; | 452 }; |
453 rtc::Buffer packet(data, sizeof(data)); | 453 rtc::Buffer packet(data, sizeof(data)); |
454 | 454 |
455 std::unique_ptr<cricket::RtpDataMediaChannel> dmc(CreateChannel()); | 455 std::unique_ptr<cricket::RtpDataMediaChannel> dmc(CreateChannel()); |
456 | 456 |
457 // Too short | 457 // Too short |
458 dmc->OnPacketReceived(&packet, rtc::PacketTime()); | 458 dmc->OnPacketReceived(&packet, rtc::PacketTime()); |
459 EXPECT_FALSE(HasReceivedData()); | 459 EXPECT_FALSE(HasReceivedData()); |
460 } | 460 } |
OLD | NEW |