Added test for makeAjaxRequest

This commit is contained in:
Ian Gilman 2013-05-21 10:39:23 -07:00
parent c3772df011
commit e4993700af

View File

@ -1,6 +1,8 @@
(function() {
module("utils");
// ----------
test("addRemoveClass", function() {
var div = OpenSeadragon.makeNeutralElement('div');
strictEqual(div.className, '',
@ -49,4 +51,15 @@
strictEqual(div.className, '',
"Removed only class");
});
// ----------
asyncTest("makeAjaxRequest", function() {
var timeWatcher = Util.timeWatcher();
OpenSeadragon.makeAjaxRequest('data/testpattern.dzi', function(xhr) {
ok(/deepzoom/.test(xhr.response), 'file loaded');
timeWatcher.done();
});
});
})();