Summary: | [mac] DRT and WKTR should disable NSBeep | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
Component: | Tools / Tests | Assignee: | Tim Horton <thorton> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin, simon.fraser | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | 120652 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Tim Horton
2013-01-18 02:43:40 PST
Created attachment 183418 [details]
meh patch
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. (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. 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); } This... didn't work. It covered some cases, but not all of them. Maybe I should do Alexey's thing instead. Cleared the review flag so this doesn’t show up as “reviewed but not landed”. 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. |