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

Unified Diff: webrtc/voice_engine/test/auto_test/standard/codec_test.cc

Issue 1267683002: Hooked up RtcEventLog. It lives in Voice Engine and pointers are propagated to ACM and Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added a unittest in codec_test.cc, to test the integration in VoE. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/shared_data.cc ('k') | webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « webrtc/voice_engine/shared_data.cc ('k') | webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698