PORT ST. LUCIE, Fla. — Every aspiring president must pass the commander-in-chief test, and that examination has not always been kind to Mitt Romney. The former CEO, in his comfort zone when focused on the economy, has stumbled during his occasional forays into foreign policy. He offended his British hosts and Palestinian leaders during an overseas trip in July, failed to mention Afghanistan in his acceptance speech at the Republican National Convention, and was roundly criticized for the timing of his assault on President Obama’s handling of violence in Libya.