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

Side by Side Diff: media/filters/pipeline_integration_test.cc

Issue 179123009: Encrypted Media: Use uint32 for systemCode in SessionError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const std::vector<uint8>& message, 86 const std::vector<uint8>& message,
87 const std::string& destination_url) = 0; 87 const std::string& destination_url) = 0;
88 88
89 virtual void OnSessionReady(uint32 session_id) = 0; 89 virtual void OnSessionReady(uint32 session_id) = 0;
90 90
91 virtual void OnSessionClosed(uint32 session_id) = 0; 91 virtual void OnSessionClosed(uint32 session_id) = 0;
92 92
93 // Errors are not expected unless overridden. 93 // Errors are not expected unless overridden.
94 virtual void OnSessionError(uint32 session_id, 94 virtual void OnSessionError(uint32 session_id,
95 MediaKeys::KeyError error_code, 95 MediaKeys::KeyError error_code,
96 int system_code) { 96 uint32 system_code) {
97 FAIL() << "Unexpected Key Error"; 97 FAIL() << "Unexpected Key Error";
98 } 98 }
99 99
100 virtual void NeedKey(const std::string& type, 100 virtual void NeedKey(const std::string& type,
101 const std::vector<uint8>& init_data, 101 const std::vector<uint8>& init_data,
102 AesDecryptor* decryptor) = 0; 102 AesDecryptor* decryptor) = 0;
103 }; 103 };
104 104
105 FakeEncryptedMedia(AppBase* app) 105 FakeEncryptedMedia(AppBase* app)
106 : decryptor_(base::Bind(&FakeEncryptedMedia::OnSessionCreated, 106 : decryptor_(base::Bind(&FakeEncryptedMedia::OnSessionCreated,
(...skipping 26 matching lines...) Expand all
133 void OnSessionReady(uint32 session_id) { 133 void OnSessionReady(uint32 session_id) {
134 app_->OnSessionReady(session_id); 134 app_->OnSessionReady(session_id);
135 } 135 }
136 136
137 void OnSessionClosed(uint32 session_id) { 137 void OnSessionClosed(uint32 session_id) {
138 app_->OnSessionClosed(session_id); 138 app_->OnSessionClosed(session_id);
139 } 139 }
140 140
141 void OnSessionError(uint32 session_id, 141 void OnSessionError(uint32 session_id,
142 MediaKeys::KeyError error_code, 142 MediaKeys::KeyError error_code,
143 int system_code) { 143 uint32 system_code) {
144 app_->OnSessionError(session_id, error_code, system_code); 144 app_->OnSessionError(session_id, error_code, system_code);
145 } 145 }
146 146
147 void NeedKey(const std::string& type, 147 void NeedKey(const std::string& type,
148 const std::vector<uint8>& init_data) { 148 const std::vector<uint8>& init_data) {
149 app_->NeedKey(type, init_data, &decryptor_); 149 app_->NeedKey(type, init_data, &decryptor_);
150 } 150 }
151 151
152 private: 152 private:
153 AesDecryptor decryptor_; 153 AesDecryptor decryptor_;
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 // Verify that VP8 video with inband text track can be played back. 1115 // Verify that VP8 video with inband text track can be played back.
1116 TEST_F(PipelineIntegrationTest, 1116 TEST_F(PipelineIntegrationTest,
1117 BasicPlayback_VP8_WebVTT_WebM) { 1117 BasicPlayback_VP8_WebVTT_WebM) {
1118 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), 1118 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"),
1119 PIPELINE_OK)); 1119 PIPELINE_OK));
1120 Play(); 1120 Play();
1121 ASSERT_TRUE(WaitUntilOnEnded()); 1121 ASSERT_TRUE(WaitUntilOnEnded());
1122 } 1122 }
1123 1123
1124 } // namespace media 1124 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698