AC Milan forward Robinho netted the winner as Brazil edged out Chile 2-1 in their final game of the year in Toronto.