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

Unified Diff: content/browser/renderer_host/media/audio_input_device_manager_unittest.cc

Issue 131503006: Initialization of audio manager for Android is now done on the audio thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now compiles Created 6 years, 10 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 | « no previous file | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
index 0731ef25a99733768a9e837308415c4af9641b20..fb9679d39840fa63bf99bbc53d894cc4b381b975 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
@@ -41,9 +41,18 @@ class MockAudioInputDeviceManagerListener
DISALLOW_COPY_AND_ASSIGN(MockAudioInputDeviceManagerListener);
};
-class AudioInputDeviceManagerTest : public testing::Test {
+// TODO(henrika): there are special restrictions for Android since
+// AudioInputDeviceManager::Open() must be called on the audio thread.
+// This test suite must be modified to run on Android.
+#if defined(OS_ANDROID)
+#define MAYBE_AudioInputDeviceManagerTest DISABLED_AudioInputDeviceManagerTest
+#else
+#define MAYBE_AudioInputDeviceManagerTest AudioInputDeviceManagerTest
+#endif
+
+class MAYBE_AudioInputDeviceManagerTest : public testing::Test {
public:
- AudioInputDeviceManagerTest() {}
+ MAYBE_AudioInputDeviceManagerTest() {}
// Returns true iff machine has an audio input device.
bool CanRunAudioInputDeviceTests() {
@@ -92,11 +101,11 @@ class AudioInputDeviceManagerTest : public testing::Test {
StreamDeviceInfoArray devices_;
private:
- DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManagerTest);
+ DISALLOW_COPY_AND_ASSIGN(MAYBE_AudioInputDeviceManagerTest);
};
// Opens and closes the devices.
-TEST_F(AudioInputDeviceManagerTest, OpenAndCloseDevice) {
+TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenAndCloseDevice) {
if (!CanRunAudioInputDeviceTests())
return;
@@ -127,7 +136,7 @@ TEST_F(AudioInputDeviceManagerTest, OpenAndCloseDevice) {
}
// Opens multiple devices at one time and closes them later.
-TEST_F(AudioInputDeviceManagerTest, OpenMultipleDevices) {
+TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenMultipleDevices) {
if (!CanRunAudioInputDeviceTests())
return;
@@ -173,7 +182,7 @@ TEST_F(AudioInputDeviceManagerTest, OpenMultipleDevices) {
}
// Opens a non-existing device.
-TEST_F(AudioInputDeviceManagerTest, OpenNotExistingDevice) {
+TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenNotExistingDevice) {
if (!CanRunAudioInputDeviceTests())
return;
InSequence s;
@@ -196,7 +205,7 @@ TEST_F(AudioInputDeviceManagerTest, OpenNotExistingDevice) {
}
// Opens default device twice.
-TEST_F(AudioInputDeviceManagerTest, OpenDeviceTwice) {
+TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenDeviceTwice) {
if (!CanRunAudioInputDeviceTests())
return;
@@ -232,7 +241,7 @@ TEST_F(AudioInputDeviceManagerTest, OpenDeviceTwice) {
}
// Accesses then closes the sessions after opening the devices.
-TEST_F(AudioInputDeviceManagerTest, AccessAndCloseSession) {
+TEST_F(MAYBE_AudioInputDeviceManagerTest, AccessAndCloseSession) {
if (!CanRunAudioInputDeviceTests())
return;
@@ -268,7 +277,7 @@ TEST_F(AudioInputDeviceManagerTest, AccessAndCloseSession) {
}
// Access an invalid session.
-TEST_F(AudioInputDeviceManagerTest, AccessInvalidSession) {
+TEST_F(MAYBE_AudioInputDeviceManagerTest, AccessInvalidSession) {
if (!CanRunAudioInputDeviceTests())
return;
InSequence s;
« no previous file with comments | « no previous file | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698