Index: chrome/test/data/webrtc/getusermedia.js |
diff --git a/chrome/test/data/webrtc/getusermedia.js b/chrome/test/data/webrtc/getusermedia.js |
index 151bddc3dd2d6df79bdd569f4bdfe03f23890cbb..067496d40171f72bbe714b9145f55cdca7d20d9a 100644 |
--- a/chrome/test/data/webrtc/getusermedia.js |
+++ b/chrome/test/data/webrtc/getusermedia.js |
@@ -45,7 +45,11 @@ function getUserMedia(requestVideo, requestAudio, mediaHints) { |
returnToTest('Browser does not support WebRTC.'); |
return; |
} |
- eval('gMediaHints = ' + mediaHints); |
+ try { |
+ eval('gMediaHints = ' + mediaHints); |
+ } catch (exception) { |
+ failTest('Not valid javascript expression: ' + mediaHints); |
+ } |
debug('Requesting: video ' + requestVideo + ', audio ' + requestAudio); |
navigator.webkitGetUserMedia({video: requestVideo, audio: requestAudio}, |