RESOLVED FIXED Bug 107251
[mac] DRT and WKTR should disable NSBeep
https://bugs.webkit.org/show_bug.cgi?id=107251
Summary [mac] DRT and WKTR should disable NSBeep
Tim Horton
Reported 2013-01-18 02:43:40 PST
We can't test NSBeep, and we don't, and it's annoying when running layout tests locally, so we should turn it off!
Attachments
meh patch (2.38 KB, patch)
2013-01-18 03:02 PST, Tim Horton
no flags
Tim Horton
Comment 1 2013-01-18 03:02:26 PST
Created attachment 183418 [details] meh patch
Simon Fraser (smfr)
Comment 2 2013-01-18 08:55:50 PST
I don't think we're trying to test NSBeep. I think we get NSBeep when some actions are not handled, no? I thought we overrode some NSResponder methods in a few places to avoid beeping.
Tim Horton
Comment 3 2013-01-18 09:42:12 PST
(In reply to comment #2) > I don't think we're trying to test NSBeep. I was joking poorly. > I think we get NSBeep when some actions are not handled, no? I thought we overrode some NSResponder methods in a few places to avoid beeping. But we also call it ourselves in a bunch of places (see WebCore::systemBeep())! Those aren't prevented.
Tim Horton
Comment 4 2013-01-18 11:35:36 PST
Alexey Proskuryakov
Comment 5 2013-01-18 23:37:22 PST
FWIW, we use a different technique to shut up plug-ins when snapshotting, and it doesn't involve SPIs: static void muteAudio(void) { AudioObjectPropertyAddress propertyAddress = { kAudioHardwarePropertyProcessIsAudible, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; UInt32 propertyData = 0; OSStatus result = AudioObjectSetPropertyData(kAudioObjectSystemObject, &propertyAddress, 0, 0, sizeof(UInt32), &propertyData); ASSERT_UNUSED(result, result == noErr); }
Tim Horton
Comment 6 2013-01-27 18:23:59 PST
This... didn't work. It covered some cases, but not all of them. Maybe I should do Alexey's thing instead.
Darin Adler
Comment 7 2013-05-13 18:08:31 PDT
Cleared the review flag so this doesn’t show up as “reviewed but not landed”.
Alexey Proskuryakov
Comment 8 2013-09-03 15:09:08 PDT
I didn't realize that this bug was still open, so I fixed the remaining case in bug 120652 (at least some of them, but hopefully all that remained). We probably don't want to disable all audio, as we need to test WebAudio.
Note You need to log in before you can comment on or make changes to this bug.