Refactor #5677 : Upgrade XHRTest to test full feature of XMLHttpRequest