Sony's Xperia Z lineup, the now-defunct predecessor to the Xperia X family, has been water resistant from the very beginning of the lineage. Although at one point, Sony backpedaled and said that it was dangerous to take the phones around the wet stuff, there was a time when they were advertised as being useful for underwater photography. The Xperia Z5, in fact, can allegedly be used while wet due to its touch screen's ability to sense the difference between a finger and a water droplet. After pressure from some of his audience, YouTuber XEETECHCARE decided to put his Xperia X to the test and see if it held up the water resistant legacy of its bloodline. The phone passed the test quite swimmingly and came out the other side fully working after no less than 2 entire minutes in the drink.
Between the Xperia Z lineup featuring water resistance, despite Sony's denial, and the feature becoming mainstream, many people had a hunch that the Xperia X may have the feature. As it turns out, that hunch might be correct. Sony has not confirmed the aquatic abilities of their newest flagship, of course, most likely for the same reason that they disclaimed those abilities in their previous lineup. Although the phones are water resistant, most likely through nano coating, any failure during aquatic use would result in the phone going belly-up and Sony having to hear about it on their customer service lines. If they claimed the phone would do OK in water, they would likely also have a warranty case on their hands.
It should be noted that the phone being used here, sporting a stylish Uncharted 4 theme, is actually the vanilla Xperia X, not the Xperia X Performance or the lower-end Xperia XA. Additionally, any waterproofing system can fail in a number of ways and hard, salty or chlorinated water could have a more devastating effect than its plain counterpart, so no matter which Xperia you have in your pocket, it may be best to refrain from that impromptu cannonball into the pool. Still, there is some peace of mind in knowing that your device could probably shrug off a quick accidental dip or some heavy rain without needing any components replaced, even if the manufacturer keeps the fact to themselves.