The iPhone 7 has the same IP67 rating as the original Apple Watch. I've used Apple Watch when swimming many times with no problem, so theoretically the iPhone 7 should be capable of surviving slight immersion in water.
I wouldn't recommend deliberately exposing it to water though, as one key difference between iPhone and Apple Watch is the fact that the phone has a physical charging port whereas the watch does not. While direct water exposure shouldn't harm the phone, residual moisture in the charging port could be harmful if you try to plug it in. iOS 10 has a specific feature that warns you if moisture is detected in the Lightning port.