зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1349480 - s/NotSupportedError/TypeError for getUserMedia({}) r=jesup
MozReview-Commit-ID: 7bJA01u7F0K --HG-- extra : rebase_source : 383fcf039842bdefac682b4839a04ee8bf5e296c
This commit is contained in:
Родитель
4bac578b9d
Коммит
ee60830406
|
@ -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" },
|
||||
|
|
Загрузка…
Ссылка в новой задаче