improve req.xhr test by verifying status code
Merge pull request #2053 from shawnzhu/fix-xhr-test

improve req.xhr test by verifying status code