#include "chrome/browser/media/prefs/capture_device_ranking.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
MATCHER(VideoCaptureDeviceInfoEq, "") { … }
MATCHER(MediaStreamDeviceInfoEq, "") { … }
template <typename T>
std::vector<T>::const_iterator GetIterForInfo(const std::vector<T>& infos,
const T& info) { … }
}
class CaptureDeviceRankingTest : public testing::Test { … };
TEST_F(CaptureDeviceRankingTest, PreferenceRankVideoDeviceInfos) { … }
TEST_F(CaptureDeviceRankingTest, PreferenceRankAudioDeviceInfos) { … }
TEST_F(CaptureDeviceRankingTest, InitializeAudioDeviceInfosRanking) { … }
TEST_F(CaptureDeviceRankingTest, InitializeVideoDeviceInfosRanking) { … }
class CaptureDeviceRankingWebMediaDeviceTest
: public CaptureDeviceRankingTest,
public testing::WithParamInterface<blink::mojom::MediaDeviceType> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(CaptureDeviceRankingWebMediaDeviceTest, PreferenceWebMediaDeviceInfos) { … }
class CaptureDeviceRankingMediaStreamDeviceTest
: public CaptureDeviceRankingTest,
public testing::WithParamInterface<blink::mojom::MediaStreamType> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(CaptureDeviceRankingMediaStreamDeviceTest,
PreferenceMediaStreamDevices) { … }