chromium/media/mojo/services/mojo_cdm_helper_unittest.cc

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

#include "media/mojo/services/mojo_cdm_helper.h"

#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "media/cdm/api/content_decryption_module.h"
#include "media/mojo/mojom/cdm_storage.mojom.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/origin.h"

Status;

namespace media {

namespace {

class MockFileIOClient : public cdm::FileIOClient {};

class TestCdmFile : public mojom::CdmFile {};

class MockCdmStorage : public mojom::CdmStorage {};

class TestFrameInterfaceFactory : public mojom::FrameInterfaceFactory {};

}  // namespace

class MojoCdmHelperTest : public testing::Test {};

TEST_F(MojoCdmHelperTest, CreateCdmFileIO_OpenClose) {}

// Simulate the case where the CDM didn't call Close(). In this case we still
// should not leak the cdm::FileIO object. LeakSanitizer bots should be able to
// catch such issues.
TEST_F(MojoCdmHelperTest, CreateCdmFileIO_OpenWithoutClose) {}

// TODO(crbug.com/40544338): Add more test cases.

}  // namespace media