Bug 1000253 - Fix a mistake in the browser_devices_get_user_media.js test, r=MattN.

This commit is contained in:
Florian Quèze 2014-05-28 00:48:05 +02:00
parent 2c1e04524a
commit edabe4c970

View File

@ -589,8 +589,7 @@ let gTests = [
expectObserverCalled("recording-window-ended");
}
else {
let allow = (aAllowVideo && aRequestVideo) || (aAllowAudio && aRequestAudio);
let expectedMessage = allow ? "ok" : "error: PERMISSION_DENIED";
let expectedMessage = aExpectStream ? "ok" : "error: PERMISSION_DENIED";
yield promiseMessage(expectedMessage, gum);
if (expectedMessage == "ok") {
@ -635,9 +634,9 @@ let gTests = [
info("deny audio, allow video, request audio+video, expect ok (video)");
yield usePerm(false, true, true, true, true);
info("deny audio, allow video, request audio, expect denied");
yield usePerm(false, true, true, false, true);
yield usePerm(false, true, true, false, false);
info("deny audio, allow video, request video, expect ok (video)");
yield usePerm(false, true, false, true, false);
yield usePerm(false, true, false, true, true);
// Allow audio, video not set.
info("allow audio, request audio+video, expect prompt");