windmill.jsTest.require('shared.js');

// Namespace obj to contain our tests
windmillMain.test_waitForXHR = new function () {
  // Make the async XHR call
  this.test_xhrCall = function () {
    // Callback function -- sets temp flag to 'returned'
    var success = function () {
      windmillMain.tempData = 'returned';
    };
    fleegix.xhr.get(success, '/test.txt');
  };
  this.test_wait = windmillMain.shared.util.waitForTempData;
  this.test_afterWait = function () {
    jum.assertEquals('returned', windmillMain.tempData);
  };
  // Remove the node so we can run the test again
  this.teardown = function () {
    windmillMain.tempData = null;
  }
};


windmill.jsTest.require('shared.js');

// Namespace obj to contain our tests
windmillMain.test_waitForXHR = new function () {
  // Make the async XHR call
  this.test_xhrCall = function () {
    // Callback function -- sets temp flag to 'returned'
    var success = function () {
      windmillMain.tempData = 'returned';
    };
    fleegix.xhr.get(success, '/windmill-serv/jstest/data.json');
  };
  this.test_wait = windmillMain.shared.util.waitForTempData;
  this.test_afterWait = function () {
    jum.assertEquals('returned', windmillMain.tempData);
  };
  // Remove the node so we can run the test again
  this.teardown = function () {
    windmillMain.tempData = null;
  }
};


Load a file that actually exists on the filesystem.
Load a file that actually exists on the filesystem.



git-svn-id: 87d19257dd11500985d055ec4730e446075a5f07@971 78c7df6f-8922-0410-bcd3-9426b1ad491b
