Added test for xhr