Bug 1349480 - s/NotSupportedError/TypeError for getUserMedia({}) r=jesup

MozReview-Commit-ID: 7bJA01u7F0K

--HG--
extra : rebase_source : 383fcf039842bdefac682b4839a04ee8bf5e296c
This commit is contained in:
Jan-Ivar Bruaroey 2017-03-22 08:41:33 -04:00
Родитель 4bac578b9d
Коммит ee60830406
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2020,7 +2020,7 @@ MediaManager::GetUserMedia(nsPIDOMWindowInner* aWindow,
if (!IsOn(c.mVideo) && !IsOn(c.mAudio)) {
RefPtr<MediaStreamError> error =
new MediaStreamError(aWindow,
NS_LITERAL_STRING("NotSupportedError"),
NS_LITERAL_STRING("TypeError"),
NS_LITERAL_STRING("audio and/or video is required"));
onFailure->OnError(error);
return NS_OK;

Просмотреть файл

@ -46,7 +46,7 @@ var tests = [
constraint: "mediaSource" },
{ message: "emtpy constraint fails",
constraints: { },
error: "NotSupportedError" },
error: "TypeError" },
{ message: "Triggering mock failure in default video device fails",
constraints: { video: { deviceId: 'bad device' }, fake: true },
error: "NotReadableError" },