Well, at risk of proving myself an idiot instead of just sounding like one, a bud and I actually tried some "scientific" tests back in our younger, drunker, and dumber college days at my uncle's lake house. We stood in water up to our chest and submerged the guns completely, with one guy underwater watching through mask and snorkel.
Beretta 92 9mm- Finicky, doesn't like to fire underwater, many jams.
Glock 9 mm (I don't remember which one) - fired full mag, no jams
Ruger P89 9mm - fired full mag, no jams. *Interestingly, we also found out that the P89 will fire and cycle basically anything you can stick into it and close the slide on, 9x18, .380, whatever, it just doesn't care. The Beretta and Glock choked on anything but 9mm.
No apparent damage was done to any of the firearms or ourselves. By the way, it's wicked cool to watch a gun fire underwater, though I have to say "don't try this at home".
**** This has been almost 20 years ago and I'm much less adventurous now, no lectures needed
****