If Obama did beat Hillary, his relative weakness amongst Hispanics, along with longstanding tensions between blacks and Hispanics, will work in McCain’s favor. Similarly, if Obama loses, black support of Hillary will probably suffer to some extent.
There is no guarantee that McCain will not try to pass an amnesty bill if elected. Whether conservatives in Congress will have enough gumption to stop him is an open question.
If Hillary wins, she will lose the Black vote (angry Blacks will stay home in November), and split the Mexican vote with Juan McCain. Hillary only has a lock the "trailer trash" women vote.