1 var sys = require("util")
2 , assert = require("assert")
3 , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
6 xhr = new XMLHttpRequest();
8 xhr.onreadystatechange = function() {
9 if (this.readyState == 4) {
10 assert.equal("Hello World", this.responseText);
16 var url = "file://" + __dirname + "/testdata.txt";
21 var runSync = function() {
22 xhr = new XMLHttpRequest();
24 xhr.onreadystatechange = function() {
25 if (this.readyState == 4) {
26 assert.equal("Hello World", this.responseText);
30 xhr.open("GET", url, false);