I have a few friends who have dogs that have never heard a firearm being shot, yet the moment any of us are ever handling firearms in a room, the dogs will usually clear the room in a hurry. These are different dogs owned by different people.
I, too, have noticed this when dealing with MY OWN dogs or the OWNER of the dog presents a firearm.
My personal dog would snarl at you if you presented a firearm [or cigarette or alcolhol] but would whine and start to move about incessantly if in a room or would trot off to his house if outside. If you were to make ANY assertive gesture with what he perceived as a threat you'd be bitten.
the same thing, but we agree that their awareness is keener than many give them credit for.