1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43

media / audio / audio_debug_recording_test.h [blame]

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MEDIA_AUDIO_AUDIO_DEBUG_RECORDING_TEST_H_
#define MEDIA_AUDIO_AUDIO_DEBUG_RECORDING_TEST_H_

#include <memory>

#include "base/memory/raw_ptr.h"
#include "base/test/task_environment.h"
#include "media/base/media_export.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {

class MockAudioDebugRecordingManager;
class MockAudioManager;

// Base test class for media/audio/ and services/audio/ debug recording test
// classes.
class AudioDebugRecordingTest : public testing::Test {
 public:
  AudioDebugRecordingTest();

  AudioDebugRecordingTest(const AudioDebugRecordingTest&) = delete;
  AudioDebugRecordingTest& operator=(const AudioDebugRecordingTest&) = delete;

  ~AudioDebugRecordingTest() override;

 protected:
  void CreateAudioManager();
  void ShutdownAudioManager();
  void InitializeAudioDebugRecordingManager();

  base::test::TaskEnvironment task_environment_;
  std::unique_ptr<MockAudioManager> mock_audio_manager_;
  raw_ptr<MockAudioDebugRecordingManager> mock_debug_recording_manager_;
};

}  // namespace media

#endif  // MEDIA_AUDIO_AUDIO_DEBUG_RECORDING_TEST_H_