зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1805582 — Add message to console when silently denying MIDI access due to no detected devices. r=gsvelto
Our test infrastructure runs with midi.testing enabled, which generates virtual devices. This is mostly what we want, but it does prevent us from testing the "no devices detected" path in automation. I've tested it locally. Differential Revision: https://phabricator.services.mozilla.com/D164722
This commit is contained in:
Родитель
60846d8883
Коммит
fb573066c8
|
@ -162,6 +162,9 @@ MIDIPermissionRequest::Run() {
|
|||
if (aHasDevices) {
|
||||
self->DoPrompt();
|
||||
} else {
|
||||
nsContentUtils::ReportToConsoleNonLocalized(
|
||||
u"Silently denying site request for MIDI access because no devices were detected. You may need to restart your browser after connecting a new device."_ns,
|
||||
nsIScriptError::infoFlag, "WebMIDI"_ns, mWindow->GetDoc());
|
||||
self->CancelWithRandomizedDelay();
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче