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);
17 var url = "file://" + __dirname + "/testdata.txt";
22 var runSync = function() {
23 xhr = new XMLHttpRequest();
25 xhr.onreadystatechange = function() {
26 if (this.readyState == 4) {
27 assert.equal("Hello World", this.responseText);
32 xhr.open("GET", url, false);