In 2017, weeks after Donald Trump’s first presidential election victory, Xi Jinping became the first Chinese head of state to address the World Economic Forum in Davos, Switzerland — winning applause as he inveighed against protectionism and declared that a trade war would hurt both sides.