summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 00:22:44 +0000
committertommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 00:22:44 +0000
commit3c3e1d6d5cbe1ed37d3ee57fc37273003e73c7f1 (patch)
treee4bfc1f9efa48c28e9107fa2042386fd835dac2a
parent19334ac5cd544c0ac566a57eab8a8bd83fae3fa3 (diff)
downloadchromium_src-3c3e1d6d5cbe1ed37d3ee57fc37273003e73c7f1.zip
chromium_src-3c3e1d6d5cbe1ed37d3ee57fc37273003e73c7f1.tar.gz
chromium_src-3c3e1d6d5cbe1ed37d3ee57fc37273003e73c7f1.tar.bz2
Revert 240470 "Make WebRTC browser tests fail cleaner when the h..."
> Make WebRTC browser tests fail cleaner when the host fails to provide a camera. > > BUG=327673 > NOTRY=True > > Review URL: https://codereview.chromium.org/114063003 TBR=phoglund@chromium.org Review URL: https://codereview.chromium.org/98203007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240494 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/data/webrtc/getusermedia.js28
-rw-r--r--chrome/test/data/webrtc/test_functions.js2
2 files changed, 2 insertions, 28 deletions
diff --git a/chrome/test/data/webrtc/getusermedia.js b/chrome/test/data/webrtc/getusermedia.js
index 1cea955..d46ddee 100644
--- a/chrome/test/data/webrtc/getusermedia.js
+++ b/chrome/test/data/webrtc/getusermedia.js
@@ -61,11 +61,7 @@ function doGetUserMedia(constraints) {
throw failTest('Not valid JavaScript expression: ' + constraints);
}
debug('Requesting doGetUserMedia: constraints: ' + constraints);
- getUserMedia(evaluatedConstraints,
- function(stream) {
- ensureGotAllExpectedStreams_(stream, constraints);
- getUserMediaOkCallback_(stream);
- },
+ getUserMedia(evaluatedConstraints, getUserMediaOkCallback_,
getUserMediaFailedCallback_);
returnToTest('ok-requested');
}
@@ -144,28 +140,6 @@ function getLocalStream() {
/**
* @private
- * @param {MediaStream} stream Media stream from getUserMedia.
- * @param {String} constraints The constraints passed
- */
-function ensureGotAllExpectedStreams_(stream, constraints) {
- var requestedVideo = /video\s*:\s*true/i;
- if (requestedVideo.test(constraints) && stream.getVideoTracks().length == 0) {
- gRequestWebcamAndMicrophoneResult = 'failed-to-get-video';
- throw ('Requested video, but did not receive a video stream from ' +
- 'getUserMedia. Perhaps the machine you are running on ' +
- 'does not have a webcam.');
- }
- var requestedAudio = /audio\s*:\s*true/i;
- if (requestedAudio.test(constraints) && stream.getAudioTracks().length == 0) {
- gRequestWebcamAndMicrophoneResult = 'failed-to-get-audio';
- throw ('Requested audio, but did not receive an audio stream ' +
- 'from getUserMedia. Perhaps the machine you are running ' +
- 'on does not have audio devices.');
- }
-}
-
-/**
- * @private
* @param {MediaStream} stream Media stream.
*/
function getUserMediaOkCallback_(stream) {
diff --git a/chrome/test/data/webrtc/test_functions.js b/chrome/test/data/webrtc/test_functions.js
index 84f7151..d053867b 100644
--- a/chrome/test/data/webrtc/test_functions.js
+++ b/chrome/test/data/webrtc/test_functions.js
@@ -84,7 +84,7 @@ function sendToTest(message) {
*/
function failTest(reason) {
console.error(reason);
- sendToTest('Test failed: ' + reason);
+ sentToTest('Test failed: ' + reason);
return new Error(reason);
}