The iPhone 7 is something called IP67 rated.
That means (roughly) that the phone is supposed to be waterproof up to 1 meter for up to 30 minutes.
So I don’t have the disposable income OR the inclination to test that out myself (plus I really like my headphone jack), but the guys over at RedmondPie.com found a video of somebody who did:
iPhone 7 Goes For Scuba Diving Test, Records 4K Underwater [Video]
A new video shows a Jet Black iPhone 7 subjected to a real-world water resistance test, with phone being taken scuba diving to varying depths while shooting 4K underwater footage.