| Index: chrome/test/data/webrtc/getusermedia.js
|
| diff --git a/chrome/test/data/webrtc/getusermedia.js b/chrome/test/data/webrtc/getusermedia.js
|
| index aabecb4fdcce27fb83a2255c94ba52cae0075f8c..874225fe31d6688385dd0d74d7a7d214043e798c 100644
|
| --- a/chrome/test/data/webrtc/getusermedia.js
|
| +++ b/chrome/test/data/webrtc/getusermedia.js
|
| @@ -39,8 +39,8 @@ var gRequestWebcamAndMicrophoneResult = 'not-called-yet';
|
| * and optional constraints defined. The contents of this parameter depends
|
| * on the WebRTC version. This should be JavaScript code that we eval().
|
| */
|
| -function getUserMedia(constraints) {
|
| - if (!navigator.webkitGetUserMedia) {
|
| +function doGetUserMedia(constraints) {
|
| + if (!getUserMedia) {
|
| returnToTest('Browser does not support WebRTC.');
|
| return;
|
| }
|
| @@ -50,15 +50,14 @@ function getUserMedia(constraints) {
|
| } catch (exception) {
|
| throw failTest('Not valid JavaScript expression: ' + constraints);
|
| }
|
| - debug('Requesting getUserMedia: constraints: ' + constraints);
|
| - navigator.webkitGetUserMedia(evaluatedConstraints,
|
| - getUserMediaOkCallback_,
|
| - getUserMediaFailedCallback_);
|
| + debug('Requesting doGetUserMedia: constraints: ' + constraints);
|
| + getUserMedia(evaluatedConstraints, getUserMediaOkCallback_,
|
| + getUserMediaFailedCallback_);
|
| returnToTest('ok-requested');
|
| }
|
|
|
| /**
|
| - * Must be called after calling getUserMedia.
|
| + * Must be called after calling doGetUserMedia.
|
| * @return {string} Returns not-called-yet if we have not yet been called back
|
| * by WebRTC. Otherwise it returns either ok-got-stream or
|
| * failed-with-error-x (where x is the error code from the error
|
| @@ -132,7 +131,7 @@ function getLocalStream() {
|
| function getUserMediaOkCallback_(stream) {
|
| gLocalStream = stream;
|
| var videoTag = $('local-view');
|
| - videoTag.src = webkitURL.createObjectURL(stream);
|
| + attachMediaStream(videoTag, stream);
|
|
|
| // Due to crbug.com/110938 the size is 0 when onloadedmetadata fires.
|
| // videoTag.onloadedmetadata = displayVideoSize_(videoTag);.
|
|
|