blob: 88908c71d91b34ac4dcb6a74dd5d989a83110f29 [file] [log] [blame] [edit]
<html>
<import src="../../resources/chai.sky" />
<import src="../../resources/mocha.sky" />
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
<script>
describe('XMLHttpRequest', function() {
it('should be able to fetch relative urls', function(done) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
// Also testing that "this" is set correctly in the onload callback.
assert.equal(this.responseText, "This is data from the network.\n");
done();
};
xhr.open("GET", "resources/pass.txt");
xhr.send();
});
});
</script>
</html>