From e4993700af5120f9abe061f007e1ff67935a15e8 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Tue, 21 May 2013 10:39:23 -0700 Subject: [PATCH] Added test for makeAjaxRequest --- test/utils.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/utils.js b/test/utils.js index c61171ee..3b7d6c49 100644 --- a/test/utils.js +++ b/test/utils.js @@ -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(); + }); + }); + })();