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

Side by Side Diff: media/audio/mac/audio_auhal_mac_unittest.cc

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. Rebase. Created 5 years 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 | « media/audio/mac/audio_auhal_mac.cc ('k') | media/audio/mock_audio_source_callback.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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "media/audio/audio_io.h" 10 #include "media/audio/audio_io.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 TEST_F(AUHALStreamTest, CreateOpenStartStopClose) { 83 TEST_F(AUHALStreamTest, CreateOpenStartStopClose) {
84 ABORT_AUDIO_TEST_IF_NOT(OutputDevicesAvailable()); 84 ABORT_AUDIO_TEST_IF_NOT(OutputDevicesAvailable());
85 85
86 AudioOutputStream* stream = Create(); 86 AudioOutputStream* stream = Create();
87 EXPECT_TRUE(stream->Open()); 87 EXPECT_TRUE(stream->Open());
88 88
89 // Wait for the first data callback from the OS. 89 // Wait for the first data callback from the OS.
90 base::WaitableEvent event(false, false); 90 base::WaitableEvent event(false, false);
91 EXPECT_CALL(source_, OnMoreData(_, _)) 91 EXPECT_CALL(source_, OnMoreData(_, _, _))
92 .WillOnce(DoAll(ZeroBuffer(), SignalEvent(&event), Return(0))); 92 .WillOnce(DoAll(ZeroBuffer(), SignalEvent(&event), Return(0)));
93 EXPECT_CALL(source_, OnError(_)).Times(0); 93 EXPECT_CALL(source_, OnError(_)).Times(0);
94 stream->Start(&source_); 94 stream->Start(&source_);
95 event.Wait(); 95 event.Wait();
96 96
97 stream->Stop(); 97 stream->Stop();
98 stream->Close(); 98 stream->Close();
99 } 99 }
100 100
101 } // namespace media 101 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/mac/audio_auhal_mac.cc ('k') | media/audio/mock_audio_source_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698