From ca539bbed0c7819d07bd6828dd1fbbf2e13cdd5c Mon Sep 17 00:00:00 2001 From: "fischman@webrtc.org" Date: Tue, 15 Apr 2014 20:26:41 +0000 Subject: [PATCH] iOS: baby steps to being able to include_tests=1 - pull iossim in DEPS even when on mac (because bug 2152) - fix audio_device_test_api.cc's use of bool instead of bool* (!) - move unused-on-mobile message to non-mobile-only section of hardware_before_streaming_test.cc BUG=3185 R=kjellander@webrtc.org, niklas.enbom@webrtc.org Review URL: https://webrtc-codereview.appspot.com/11989004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5914 4adac7df-926f-26a2-2b94-8c16560cd09d --- DEPS | 6 ++++++ webrtc/modules/audio_device/test/audio_device_test_api.cc | 8 ++++---- webrtc/modules/audio_device/test/func_test_manager.cc | 4 ++-- .../auto_test/standard/hardware_before_streaming_test.cc | 8 ++++---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/DEPS b/DEPS index 62e4e0959..a918240eb 100644 --- a/DEPS +++ b/DEPS @@ -161,6 +161,12 @@ deps_os = { # NSS, for SSLClientSocketNSS. "third_party/nss": From("chromium_deps", "src/third_party/nss"), + + # TODO(kjellander): remove once bug 2152 is fixed. + # This needs to specify the path directly (instead of using the + # chromium_deps version) because chromium_deps only defines this for ios. + "testing/iossim/third_party/class-dump": + Var("chromium_trunk") + "/deps/third_party/class-dump@199203", }, "ios": { diff --git a/webrtc/modules/audio_device/test/audio_device_test_api.cc b/webrtc/modules/audio_device/test/audio_device_test_api.cc index fb00e0a4e..2749e8349 100644 --- a/webrtc/modules/audio_device/test/audio_device_test_api.cc +++ b/webrtc/modules/audio_device/test/audio_device_test_api.cc @@ -1792,19 +1792,19 @@ TEST_F(AudioDeviceAPITest, SetPlayoutSpeaker) { #if defined(WEBRTC_IOS) // Not playing or recording, should just return a success EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(true)); - EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn)); + EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn)); EXPECT_TRUE(loudspeakerOn); EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(false)); - EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn)); + EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn)); EXPECT_FALSE(loudspeakerOn); EXPECT_EQ(0, audio_device_->InitPlayout()); EXPECT_EQ(0, audio_device_->StartPlayout()); EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(true)); - EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn)); + EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn)); EXPECT_TRUE(loudspeakerOn); EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(false)); - EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn)); + EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(&loudspeakerOn)); EXPECT_FALSE(loudspeakerOn); #else diff --git a/webrtc/modules/audio_device/test/func_test_manager.cc b/webrtc/modules/audio_device/test/func_test_manager.cc index 30123d1ba..9f80282dd 100644 --- a/webrtc/modules/audio_device/test/func_test_manager.cc +++ b/webrtc/modules/audio_device/test/func_test_manager.cc @@ -2688,7 +2688,7 @@ int32_t FuncTestManager::TestAdvancedMBAPI() " from the loudspeaker.\n\ > Press any key to stop...\n \n"); PAUSE(DEFAULT_PAUSE_TIME); - EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(loudspeakerOn)); + EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(&loudspeakerOn)); EXPECT_TRUE(loudspeakerOn); TEST_LOG("Set to not use speaker\n"); @@ -2697,7 +2697,7 @@ int32_t FuncTestManager::TestAdvancedMBAPI() " from the loudspeaker.\n\ > Press any key to stop...\n \n"); PAUSE(DEFAULT_PAUSE_TIME); - EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(loudspeakerOn)); + EXPECT_EQ(0, audioDevice->GetLoudspeakerStatus(&loudspeakerOn)); EXPECT_FALSE(loudspeakerOn); #endif diff --git a/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc b/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc index 2fd34e7d5..e8863c57c 100644 --- a/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc +++ b/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc @@ -14,10 +14,6 @@ using namespace webrtc; -static const char* kNoDevicesErrorMessage = - "Either you have no recording / playout device " - "on your system, or the method failed."; - class HardwareBeforeStreamingTest : public AfterInitializationFixture { }; @@ -51,6 +47,10 @@ TEST_F(HardwareBeforeStreamingTest, ResetsAudioDeviceOnIphone) { // Tests that only apply to desktop: #if !defined(WEBRTC_IOS) & !defined(WEBRTC_ANDROID) +static const char* kNoDevicesErrorMessage = + "Either you have no recording / playout device " + "on your system, or the method failed."; + TEST_F(HardwareBeforeStreamingTest, GetPlayoutDeviceStatusReturnsTrue) { bool play_available = false; EXPECT_EQ(0, voe_hardware_->GetPlayoutDeviceStatus(play_available));