add test for xhr