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

Side by Side Diff: content/test/data/media/encrypted_media_utils.js

Issue 11583013: Ensure keymessage response to generateKeyRequest() has keySystem set for external CDMs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var QueryString = function() { 5 var QueryString = function() {
6 // Allows access to query parameters on the URL; e.g., given a URL like: 6 // Allows access to query parameters on the URL; e.g., given a URL like:
7 // http://<server>/my.html?test=123&bob=123 7 // http://<server>/my.html?test=123&bob=123
8 // Parameters can then be accessed via QueryString.test or QueryString.bob. 8 // Parameters can then be accessed via QueryString.test or QueryString.bob.
9 var params = {}; 9 var params = {};
10 // RegEx to split out values by &. 10 // RegEx to split out values by &.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 catch(error) { 110 catch(error) {
111 setDocTitle("GenerateKeyRequestException"); 111 setDocTitle("GenerateKeyRequestException");
112 } 112 }
113 } 113 }
114 114
115 function onKeyAdded(e) { 115 function onKeyAdded(e) {
116 e.target.receivedKeyAdded = true; 116 e.target.receivedKeyAdded = true;
117 } 117 }
118 118
119 function onKeyMessage(e) { 119 function onKeyMessage(e) {
120 // TODO(ddorwin): Enable after fixing http://crbug.com/166204. 120 if (!e.keySystem) {
121 if (!e.keySystem && false) {
122 failTest('keymessage without a keySystem: ' + e.keySystem); 121 failTest('keymessage without a keySystem: ' + e.keySystem);
123 return; 122 return;
124 } 123 }
125 124
126 if (!e.sessionId) { 125 if (!e.sessionId) {
127 failTest('keymessage without a sessionId: ' + e.sessionId); 126 failTest('keymessage without a sessionId: ' + e.sessionId);
128 return; 127 return;
129 } 128 }
130 129
131 if (!e.message) { 130 if (!e.message) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 mediaSource.addEventListener('webkitsourceopen', onSourceOpen); 168 mediaSource.addEventListener('webkitsourceopen', onSourceOpen);
170 video.addEventListener('webkitneedkey', onNeedKey); 169 video.addEventListener('webkitneedkey', onNeedKey);
171 video.addEventListener('webkitkeymessage', onKeyMessage); 170 video.addEventListener('webkitkeymessage', onKeyMessage);
172 video.addEventListener('webkitkeyerror', failTest); 171 video.addEventListener('webkitkeyerror', failTest);
173 video.addEventListener('webkitkeyadded', onKeyAdded); 172 video.addEventListener('webkitkeyadded', onKeyAdded);
174 installTitleEventHandler(video, 'error'); 173 installTitleEventHandler(video, 'error');
175 174
176 video.src = window.URL.createObjectURL(mediaSource); 175 video.src = window.URL.createObjectURL(mediaSource);
177 return mediaSource; 176 return mediaSource;
178 } 177 }
OLDNEW
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698