the 144hr visa for Shanghai is fine as long as you are within those hours, and not travelling outside of Shanghai. HK they grant the tourist visa when you land, and if you're just changing planes in Canada you might not even clear customs, if you do, I assume it's the granted at landing visa, same as it is for us to go to the States