The leaders of Japan and Canada have agreed to greater defense cooperation as U.S. President Donald Trump raises the pressure on military spending.