Six months ago, Justin Trudeau went to Davos, Switzerland to pitch the World Economic Forum on a vision of shared prosperity, proper leadership and embracing diversity.

A day later, David Cameron appeared on stage and tried to explain why he was preparing to plunge Britain into a referendum over its membership in the European Union.

"Now, some people ask me, 'Well, why are you holding a referendum?'" he acknowledged, after explaining that his aim was for Britain to remain within a "reformed" EU.

"I think it's absolutely essential to have full and proper democratic support for what Britain's place should be in Europe and that's why we're holding the referendum."

Oopsie.

If Cameron is invited back to Davos next year, it will be as a former prime minister. He will no doubt be asked to reflect on how and why his deeply divided country decided to remove itself from the European experiment in common cause, possibly precipitating the breakup of the United Kingdom in the process.

Hints of exclusion, alienation and fears about immigration

There is possibly a lesson here in how one should be careful and cautious when conducting national debates about foundational matters (like, say, electoral reform).

But there are, as well, hints that what happened in Britain on Thursday night was driven by economic exclusion, political alienation and fears about immigration. Precisely the sorts of things Trudeau has seemed eager to be seen as standing against.

"Simply put, everybody needs to benefit from growth in order to sustain growth," he said in Switzerland.

"I believe in positive, ambitious leadership," Trudeau explained. "We need to trust citizens.

"We need societies that recognize diversity as a source of strength," he added. "Not a source of weakness."

His is the government of the "middle class" and "real change" and 25,000 Syrian refugees.

Back in January, Trudeau's appeal to diversity seemed like an implicit response to Donald Trump. And it now seems like a warning about Brexit.

Indeed, it seems the U.S. election and the British referendum have something in common.

And now in between the two riled colossuses of the English world, there is genteel Canada, probably striking some kind of yoga pose, possibly about to be overrun by fleeing Brits and Yanks.

UK Independence Party Leader Nigel Farage addresses the media during a campaign stop, urging voters to leave the EU ahead of the so-called Brexit vote. (Daniel Leal-Olivas/Getty)

Trudeau's opportunity

That speech in Davos was officially entitled "The Canadian Opportunity," likely intended as a pitch to investors, as if Canada was a hot new condo development. But the opportunity here is also Trudeau's: to demonstrate that his touted ideals can be put into action to the general satisfaction of voters.

Trudeau was enthusiastic about those 25,000 Syrians — believing it was also about showing Canadians that they could accomplish big things — but getting those refugees to Canada was the easy part. Now they need enough support to ensure they succeed.

The theme of this year's World Economic Forum was "The Fourth Industrial Revolution," a lofty slogan for the massive change new technologies will bring. The Trudeau government is quite keen on an innovation agenda that would modernize and diversify the Canadian economy.

But how to ensure that this change — like the change of globalization — doesn't leave great numbers of people behind?

"It's not hard to see how the connections between computing, information, robotics and biotechnologies could deliver spectacular progress," Trudeau said in January. "It's also not hard to imagine how it could produce mass unemployment and greater inequality."

In between shared prosperity and diversity, Trudeau proposed merely that "we can fight climate change without sacrificing growth and prosperity."

Winning license for further ambition

There are those, of course, who would argue that government is almost antithetical to the idea of innovation.

And therein lies the challenge of demonstrating that the state can be a worthy and active force for good. And perhaps, too, the challenge of combating cynicism with political and democratic reforms.

"The more results we achieve for people, the more we grow the middle class and create real chances for those working hard to join the middle class, the more people will grant you a licence for further ambition," Trudeau explained.

Donald Trump speaks during a campaign rally in Greensboro, N.C., on June 14, 2016. (The Associated Press)

Next to firebrands like Trump, Bernie Sanders, Nigel Farage and Boris Johnson, Trudeau must seem like a moment of zen — particularly for liberals who imagine the state can be a useful and active actor and that liberalized economic policy is still relevant.

He need only now match the lovely pictures with something resembling effective government.

Analogies, of course, are fraught. Canada is not as driven by class and culture as are Britain and the United States, nor faced with the same level of income inequality. The immigration challenges are different. The American political system is a mess.

But Trudeau's challenge was perhaps always going to include establishing a new liberal idea of government to counter the conservative proposal of his predecessor and the populist social democracy of the further left. And he has already been claimed by some progressives as an heir to the Third Way of Bill Clinton and Tony Blair. (Blair's old party now being a mess and Clinton's still likely to be limited in what it can accomplish.)

Now Trudeau and his sunny ways look the opposite of Brexit and Trump, which might only increase the pressure on him to succeed.