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

Unified Diff: media/cdm/cdm_adapter_unittest.cc

Issue 1888603002: Add CdmFileIOProvider interface for use by cdm_adapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Win compile issue Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cdm/cdm_adapter.cc ('k') | media/cdm/cdm_file_io.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/cdm_adapter_unittest.cc
diff --git a/media/cdm/cdm_adapter_unittest.cc b/media/cdm/cdm_adapter_unittest.cc
index ae743852835e4087128a6ead96869435eaf19573..05bed036d347efa67840c8ec351255ff149369c7 100644
--- a/media/cdm/cdm_adapter_unittest.cc
+++ b/media/cdm/cdm_adapter_unittest.cc
@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "media/cdm/cdm_adapter.h"
+
#include <stdint.h>
+#include <memory>
#include "base/bind.h"
#include "base/logging.h"
@@ -12,7 +15,7 @@
#include "media/base/cdm_callback_promise.h"
#include "media/base/cdm_key_information.h"
#include "media/base/media_keys.h"
-#include "media/cdm/cdm_adapter.h"
+#include "media/cdm/cdm_file_io.h"
#include "media/cdm/external_clear_key_test_helper.h"
#include "media/cdm/simple_cdm_allocator.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -82,9 +85,9 @@ class CdmAdapterTest : public testing::Test {
ExpectedResult expected_result) {
CdmConfig cdm_config; // default settings of false are sufficient.
scoped_ptr<CdmAllocator> allocator(new SimpleCdmAllocator());
-
CdmAdapter::Create(
helper_.KeySystemName(), library_path, cdm_config, std::move(allocator),
+ base::Bind(&CdmAdapterTest::CreateCdmFileIO, base::Unretained(this)),
base::Bind(&CdmAdapterTest::OnSessionMessage, base::Unretained(this)),
base::Bind(&CdmAdapterTest::OnSessionClosed, base::Unretained(this)),
base::Bind(&CdmAdapterTest::OnLegacySessionError,
@@ -203,6 +206,11 @@ class CdmAdapterTest : public testing::Test {
void RunUntilIdle() { message_loop_.RunUntilIdle(); }
+ std::unique_ptr<CdmFileIO> CreateCdmFileIO(cdm::FileIOClient* client) {
+ ADD_FAILURE() << "Should never be called";
+ return nullptr;
+ }
+
// Methods used for promise resolved/rejected.
MOCK_METHOD0(OnResolve, void());
MOCK_METHOD1(OnResolveWithSession, void(const std::string& session_id));
« no previous file with comments | « media/cdm/cdm_adapter.cc ('k') | media/cdm/cdm_file_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698