#include "services/audio/output_glitch_counter.h"
#include <memory>
#include <string>
#include <tuple>
#include "base/check_op.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "media/base/audio_latency.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace audio {
namespace {
const std::string kMissedDeadlineIntervals = …;
const std::string kMissedDeadlineMixingIntervals = …;
const std::string kMissedDeadlineShort = …;
const std::string kMissedDeadlineMixingShort = …;
const std::string kAudioGlitches2 = …;
class OutputGlitchCounterTest : public ::testing::Test { … };
TEST_F(OutputGlitchCounterTest, IntervalHistograms) { … }
TEST_F(OutputGlitchCounterTest, MixingThenStopMixing) { … }
TEST_F(OutputGlitchCounterTest, ShortHistograms) { … }
TEST_F(OutputGlitchCounterTest, BinaryGlitchMetricTrue) { … }
TEST_F(OutputGlitchCounterTest, BinaryGlitchMetricFalse) { … }
TEST_F(OutputGlitchCounterTest, GetLogStats) { … }
class OutputGlitchCounterNamesTest
: public ::testing::TestWithParam<
std::tuple<media::AudioLatency::Type, std::string>> { … };
TEST_P(OutputGlitchCounterNamesTest, MetricNames) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}