Chromium Code Reviews| Index: webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
| diff --git a/webrtc/voice_engine/test/auto_test/standard/codec_test.cc b/webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
| index bfc2a30c5f4940beb7a72f24c267917b1e7f918f..9b8c8b321bf235ef72b05b5625331c43a453449f 100644 |
| --- a/webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
| +++ b/webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
| @@ -8,8 +8,14 @@ |
| * be found in the AUTHORS file in the root of the source tree. |
| */ |
| +#include <stdio.h> |
| +#include <string> |
| + |
| +#include "webrtc/test/test_suite.h" |
| +#include "webrtc/test/testsupport/fileutils.h" |
| #include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h" |
| #include "webrtc/voice_engine/voice_engine_defines.h" |
| +#include "webrtc/video/rtc_event_log.h" |
| class CodecTest : public AfterStreamingFixture { |
| protected: |
| @@ -182,6 +188,32 @@ TEST_F(CodecTest, OpusDtxCannotBeSetForNonOpus) { |
| } |
| } |
| +#ifdef ENABLE_RTC_EVENT_LOG |
| +TEST_F(CodecTest, RtcEventLogIntegrationTest) { |
| + webrtc::RtcEventLog* event_log = voe_codec_->GetEventLog(); |
| + ASSERT_TRUE(event_log); |
| + |
| + // Find the name of the current test, in order to use it as a temporary |
| + // filename. |
| + auto test_info = ::testing::UnitTest::GetInstance()->current_test_info(); |
| + const std::string temp_filename = webrtc::test::OutputPath() + |
| + test_info->test_case_name() + |
| + test_info->name(); |
| + // Create a log file. |
| + event_log->StartLogging(temp_filename, 1000); |
| + event_log->StopLogging(); |
|
Henrik Grunell WebRTC
2015/08/24 09:03:03
Is there maybe any VoE function call that should r
ivoc
2015/08/24 12:17:29
There are currently no functions on the VoE API th
Henrik Grunell WebRTC
2015/08/24 12:23:34
If there's other tests that covers those I'm fine
|
| + |
| + // Check if the file has been created. |
| + FILE* event_file = fopen(temp_filename.c_str(), "r"); |
| + EXPECT_TRUE(event_file); |
|
Henrik Grunell WebRTC
2015/08/24 09:03:02
I think you can just assert here, if it couldn't b
ivoc
2015/08/24 12:17:29
Done.
|
| + if (event_file) { |
| + fclose(event_file); |
| + // Remove the temporary file. |
| + remove(temp_filename.c_str()); |
| + } |
| +} |
| +#endif // ENABLE_RTC_EVENT_LOG |
| + |
| // TODO(xians, phoglund): Re-enable when issue 372 is resolved. |
| TEST_F(CodecTest, DISABLED_ManualVerifySendCodecsForAllPacketSizes) { |
| for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) { |