Tesla, like all other EV/Hybrid manufacturers takes great steps to ensure the high-voltage system is well sealed from water. In addition, all EV/HEV systems I've ever seen have a high-voltage leakage detection system that is similar to a GFCI or RCD on AC outlets. If there is any appreciable leakage of voltage, the system will detect it and shut down at some point. The systems are all double insulated and completely isolated from the chassis ground, so a single short from one HV cable to ground would not pose any danger. (This would definitely trigger the leakage safety system)
In addition, Tesla's battery pack is hermetically sealed so water cannot enter it, but if did, such as in an accident, there is a sensor inside to detect this. Outside of the pack, I have not seen any other specific "immersion" sensors on my Model S or any other EV. Tesla dos have some interesting sensors for other things though, such as air pressure sensors in each side door to detect an impending side impact.
From anecdotal evidence, it appears the Model S will alert with driver with "pull over safely" and "Car might not restart" warnings in the event of a minor high-voltage leak, but will not immediately open the contactors while driving (likely for safety reasons).