xhr: Wrote tests for xhr.js

- [ ] @davestein
`.jscsrc` exists.