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

Unified Diff: media/test/pipeline_integration_test_base.h

Issue 1761603002: media: Handle "encrypted" event in pipeline_integration_fuzzertest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 10 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/test/pipeline_integration_fuzzertest.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.h
diff --git a/media/test/pipeline_integration_test_base.h b/media/test/pipeline_integration_test_base.h
index bd31e42d9c7e9c8674618f29fffbe57ac531dff4..2cbbdea6690fffd12853dbec9074cf0e3a6179e7 100644
--- a/media/test/pipeline_integration_test_base.h
+++ b/media/test/pipeline_integration_test_base.h
@@ -85,8 +85,11 @@ class PipelineIntegrationTestBase {
bool Suspend();
bool Resume(base::TimeDelta seek_time);
void Stop();
- bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time);
+ // Fails the test with |status|.
+ void FailTest(PipelineStatus status);
+
+ bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time);
bool WaitUntilOnEnded();
PipelineStatus WaitUntilEndedOrError();
@@ -105,6 +108,13 @@ class PipelineIntegrationTestBase {
// Pipeline must have been started with clockless playback enabled.
base::TimeDelta GetAudioTime();
+ // Sets a callback to handle EME "encrypted" event. Must be called to test
ddorwin 2016/03/03 19:46:20 ... called if the media might be encrypted? "poten
xhwang 2016/03/03 21:13:31 The EncryptedMediaInitDataCB will be fired iff the
+ // potentially encrypted media.
+ void set_encrypted_media_init_data_cb(
+ const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) {
+ encrypted_media_init_data_cb_ = encrypted_media_init_data_cb;
+ }
+
protected:
base::MessageLoop message_loop_;
base::MD5Context md5_context_;
@@ -137,10 +147,6 @@ class PipelineIntegrationTestBase {
void OnStatusCallback(PipelineStatus status);
void DemuxerEncryptedMediaInitDataCB(EmeInitDataType type,
const std::vector<uint8_t>& init_data);
- void set_encrypted_media_init_data_cb(
- const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) {
- encrypted_media_init_data_cb_ = encrypted_media_init_data_cb;
- }
void OnEnded();
void OnError(PipelineStatus status);
« no previous file with comments | « media/test/pipeline_integration_fuzzertest.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698