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

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc

Issue 2808833002: Delay based logging. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 const rtclog::DelayBasedBweUpdate& bwe_event = event.delay_based_bwe_update(); 533 const rtclog::DelayBasedBweUpdate& bwe_event = event.delay_based_bwe_update();
534 ASSERT_TRUE(bwe_event.has_bitrate_bps()); 534 ASSERT_TRUE(bwe_event.has_bitrate_bps());
535 EXPECT_EQ(bitrate, bwe_event.bitrate_bps()); 535 EXPECT_EQ(bitrate, bwe_event.bitrate_bps());
536 ASSERT_TRUE(bwe_event.has_detector_state()); 536 ASSERT_TRUE(bwe_event.has_detector_state());
537 EXPECT_EQ(detector_state, 537 EXPECT_EQ(detector_state,
538 GetRuntimeDetectorState(bwe_event.detector_state())); 538 GetRuntimeDetectorState(bwe_event.detector_state()));
539 539
540 // Check consistency of the parser. 540 // Check consistency of the parser.
541 int32_t parsed_bitrate; 541 int32_t parsed_bitrate;
542 BandwidthUsage parsed_detector_state; 542 BandwidthUsage parsed_detector_state;
543 parsed_log.GetDelayBasedBweUpdate(index, &parsed_bitrate, 543 ParsedRtcEventLog::BweDelayBasedUpdate res =
544 &parsed_detector_state); 544 parsed_log.GetDelayBasedBweUpdate(index);
545 EXPECT_EQ(bitrate, parsed_bitrate); 545 EXPECT_EQ(res.bitrate_bps, parsed_bitrate);
546 EXPECT_EQ(detector_state, parsed_detector_state); 546 EXPECT_EQ(res.detector_state, parsed_detector_state);
547 } 547 }
548 548
549 void RtcEventLogTestHelper::VerifyAudioNetworkAdaptation( 549 void RtcEventLogTestHelper::VerifyAudioNetworkAdaptation(
550 const ParsedRtcEventLog& parsed_log, 550 const ParsedRtcEventLog& parsed_log,
551 size_t index, 551 size_t index,
552 const AudioEncoderRuntimeConfig& config) { 552 const AudioEncoderRuntimeConfig& config) {
553 AudioEncoderRuntimeConfig parsed_config; 553 AudioEncoderRuntimeConfig parsed_config;
554 parsed_log.GetAudioNetworkAdaptation(index, &parsed_config); 554 parsed_log.GetAudioNetworkAdaptation(index, &parsed_config);
555 EXPECT_EQ(config.bitrate_bps, parsed_config.bitrate_bps); 555 EXPECT_EQ(config.bitrate_bps, parsed_config.bitrate_bps);
556 EXPECT_EQ(config.enable_dtx, parsed_config.enable_dtx); 556 EXPECT_EQ(config.enable_dtx, parsed_config.enable_dtx);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 ASSERT_TRUE(bwe_event.has_id()); 634 ASSERT_TRUE(bwe_event.has_id());
635 EXPECT_EQ(id, bwe_event.id()); 635 EXPECT_EQ(id, bwe_event.id());
636 ASSERT_TRUE(bwe_event.has_result()); 636 ASSERT_TRUE(bwe_event.has_result());
637 EXPECT_EQ(GetProbeResultType(failure_reason), bwe_event.result()); 637 EXPECT_EQ(GetProbeResultType(failure_reason), bwe_event.result());
638 ASSERT_FALSE(bwe_event.has_bitrate_bps()); 638 ASSERT_FALSE(bwe_event.has_bitrate_bps());
639 639
640 // TODO(philipel): Verify the parser when parsing has been implemented. 640 // TODO(philipel): Verify the parser when parsing has been implemented.
641 } 641 }
642 642
643 } // namespace webrtc 643 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698