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

Unified Diff: media/cdm/ppapi/cdm_file_io_test.h

Issue 93243003: Add CDM FileIO tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
Index: media/cdm/ppapi/cdm_file_io_test.h
diff --git a/media/cdm/ppapi/cdm_file_io_test.h b/media/cdm/ppapi/cdm_file_io_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..7f5eeb80229cabf9d37c771b64505f84d82ce678
--- /dev/null
+++ b/media/cdm/ppapi/cdm_file_io_test.h
@@ -0,0 +1,42 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_CDM_PPAPI_CDM_FILE_IO_TEST_H_
+#define MEDIA_CDM_PPAPI_CDM_FILE_IO_TEST_H_
+
+#include "base/callback.h"
+#include "base/compiler_specific.h"
+#include "media/cdm/ppapi/api/content_decryption_module.h"
+
+namespace media {
+
+class CdmFileIOTest : public cdm::CdmFileIOClient {
ddorwin 2013/12/04 05:27:08 Please explain how this is intended to be do. It's
xhwang 2013/12/10 01:24:25 Done.
+ public:
+ typedef base::Callback<void(bool success)> CompletionCB;
+
+ CdmFileIOTest();
+ virtual ~CdmFileIOTest();
+
+ // cdm::CdmFileIOClient implementation.
+ virtual void OnOpenComplete(Status status) OVERRIDE;
+ virtual void OnReadComplete(Status status,
+ const uint8_t* data, uint32_t data_size) OVERRIDE;
+ virtual void OnWriteComplete(Status status) OVERRIDE;
+
+ void Run(cdm::CdmFileIO* cdm_file_io, CompletionCB completion_cb);
+
+ private:
+ void OnTestComplete(bool success);
+
+ cdm::CdmFileIO* cdm_file_io_;
+ CompletionCB completion_cb_;
+
+ std::vector<uint8_t> test_data_;
+
+ DISALLOW_COPY_AND_ASSIGN (CdmFileIOTest);
+};
+
+} // namespace media
+
+#endif // MEDIA_CDM_PPAPI_CDM_FILE_IO_TEST_H_

Powered by Google App Engine
This is Rietveld 408576698