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

Unified Diff: media/audio/mac/audio_low_latency_input_mac_unittest.cc

Issue 8234009: Adding input and output delay estimation for mac. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: replace deprecated AudioDevice* with AudioObject* & round the latency before converting to bytes Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/mac/audio_low_latency_input_mac.cc ('k') | media/audio/mac/audio_low_latency_output_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_low_latency_input_mac_unittest.cc
diff --git a/media/audio/mac/audio_low_latency_input_mac_unittest.cc b/media/audio/mac/audio_low_latency_input_mac_unittest.cc
index ea492a42a47169c090dd17cfd9d089e3fd274e5a..3d94ad69129777749a924aa26a9f66245fd3cb5c 100644
--- a/media/audio/mac/audio_low_latency_input_mac_unittest.cc
+++ b/media/audio/mac/audio_low_latency_input_mac_unittest.cc
@@ -13,8 +13,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Between;
+using ::testing::Ge;
using ::testing::NotNull;
class MockAudioInputCallback : public AudioInputStream::AudioInputCallback {
@@ -215,7 +217,8 @@ TEST(MacAudioInputTest, AUAudioInputStreamVerifyMonoRecording) {
// startup sequence takes some time, it is reasonable to expect 5-10
// callbacks in this time period. All should contain valid packets of
// the same size.
- EXPECT_CALL(sink, OnData(ais, NotNull(), bytes_per_packet, bytes_per_packet))
+ EXPECT_CALL(sink, OnData(ais, NotNull(), bytes_per_packet,
+ Ge(bytes_per_packet)))
.Times(Between(5, 10));
ais->Start(&sink);
@@ -248,7 +251,8 @@ TEST(MacAudioInputTest, AUAudioInputStreamVerifyStereoRecording) {
// startup sequence takes some time, it is reasonable to expect 5-10
// callbacks in this time period. All should contain valid packets of
// the same size.
- EXPECT_CALL(sink, OnData(ais, NotNull(), bytes_per_packet, bytes_per_packet))
+ EXPECT_CALL(sink, OnData(ais, NotNull(), bytes_per_packet,
+ Ge(bytes_per_packet)))
.Times(Between(5, 10));
ais->Start(&sink);
« no previous file with comments | « media/audio/mac/audio_low_latency_input_mac.cc ('k') | media/audio/mac/audio_low_latency_output_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698