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

Side by Side Diff: media/audio/audio_input_controller_unittest.cc

Issue 7601002: Revert r95841 due to failing media_unittests on linux_shared bot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_input_controller.h ('k') | media/audio/audio_io.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/synchronization/waitable_event.h" 6 #include "base/synchronization/waitable_event.h"
7 #include "media/audio/audio_input_controller.h" 7 #include "media/audio/audio_input_controller.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Wait for OnCreated() to be called. 132 // Wait for OnCreated() to be called.
133 event.Wait(); 133 event.Wait();
134 event.Reset(); 134 event.Reset();
135 135
136 // Record and then wait for the event to be signaled. 136 // Record and then wait for the event to be signaled.
137 controller->Record(); 137 controller->Record();
138 event.Wait(); 138 event.Wait();
139 event.Reset(); 139 event.Reset();
140 140
141 // Wait for the stream to be stopped. 141 // Wait for the stream to be stopped.
142 AudioInputStream* stream = controller->stream_for_testing(); 142 AudioInputStream* stream = controller->stream();
143 stream->Stop(); 143 stream->Stop();
144 event.Wait(); 144 event.Wait();
145 145
146 controller->Close(); 146 controller->Close();
147 } 147 }
148 148
149 // Test that AudioInputController rejects insanely large packet sizes. 149 // Test that AudioInputController rejects insanely large packet sizes.
150 TEST(AudioInputControllerTest, SamplesPerPacketTooLarge) { 150 TEST(AudioInputControllerTest, SamplesPerPacketTooLarge) {
151 // Create an audio device with a very large packet size. 151 // Create an audio device with a very large packet size.
152 MockAudioInputControllerEventHandler event_handler; 152 MockAudioInputControllerEventHandler event_handler;
(...skipping 13 matching lines...) Expand all
166 kSampleRate, kBitsPerSample, kSamplesPerPacket); 166 kSampleRate, kBitsPerSample, kSamplesPerPacket);
167 scoped_refptr<AudioInputController> controller = 167 scoped_refptr<AudioInputController> controller =
168 AudioInputController::Create(&event_handler, params); 168 AudioInputController::Create(&event_handler, params);
169 ASSERT_TRUE(controller.get()); 169 ASSERT_TRUE(controller.get());
170 170
171 controller->Close(); 171 controller->Close();
172 controller->Close(); 172 controller->Close();
173 } 173 }
174 174
175 } // namespace media 175 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_input_controller.h ('k') | media/audio/audio_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698