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

Side by Side Diff: webrtc/api/dtmfsender_unittest.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 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 | « no previous file | webrtc/api/peerconnectionendtoend_unittest.cc » ('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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 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
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return (can_insert_dtmf_tracks_.count(track_label) != 0); 78 return (can_insert_dtmf_tracks_.count(track_label) != 0);
79 } 79 }
80 80
81 bool InsertDtmf(const std::string& track_label, 81 bool InsertDtmf(const std::string& track_label,
82 int code, 82 int code,
83 int duration) override { 83 int duration) override {
84 int gap = 0; 84 int gap = 0;
85 // TODO(ronghuawu): Make the timer (basically the rtc::TimeNanos) 85 // TODO(ronghuawu): Make the timer (basically the rtc::TimeNanos)
86 // mockable and use a fake timer in the unit tests. 86 // mockable and use a fake timer in the unit tests.
87 if (last_insert_dtmf_call_ > 0) { 87 if (last_insert_dtmf_call_ > 0) {
88 gap = static_cast<int>(rtc::Time() - last_insert_dtmf_call_); 88 gap = static_cast<int>(rtc::TimeMillis() - last_insert_dtmf_call_);
89 } 89 }
90 last_insert_dtmf_call_ = rtc::Time(); 90 last_insert_dtmf_call_ = rtc::TimeMillis();
91 91
92 LOG(LS_VERBOSE) << "FakeDtmfProvider::InsertDtmf code=" << code 92 LOG(LS_VERBOSE) << "FakeDtmfProvider::InsertDtmf code=" << code
93 << " duration=" << duration 93 << " duration=" << duration
94 << " gap=" << gap << "."; 94 << " gap=" << gap << ".";
95 dtmf_info_queue_.push_back(DtmfInfo(code, duration, gap)); 95 dtmf_info_queue_.push_back(DtmfInfo(code, duration, gap));
96 return true; 96 return true;
97 } 97 }
98 98
99 sigslot::signal0<>* GetOnDestroyedSignal() override { 99 sigslot::signal0<>* GetOnDestroyedSignal() override {
100 return &SignalDestroyed; 100 return &SignalDestroyed;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 std::string tones = "3,4"; 334 std::string tones = "3,4";
335 int duration = 100; 335 int duration = 100;
336 int inter_tone_gap = 50; 336 int inter_tone_gap = 50;
337 337
338 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 6001, inter_tone_gap)); 338 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 6001, inter_tone_gap));
339 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 69, inter_tone_gap)); 339 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 69, inter_tone_gap));
340 EXPECT_FALSE(dtmf_->InsertDtmf(tones, duration, 49)); 340 EXPECT_FALSE(dtmf_->InsertDtmf(tones, duration, 49));
341 341
342 EXPECT_TRUE(dtmf_->InsertDtmf(tones, duration, inter_tone_gap)); 342 EXPECT_TRUE(dtmf_->InsertDtmf(tones, duration, inter_tone_gap));
343 } 343 }
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnectionendtoend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698