michael@0: function handleRequest(request, response) michael@0: { michael@0: if (request.queryString.indexOf("report") != -1) { michael@0: response.setHeader("Content-Type", "text/javascript", false); michael@0: if (getState("loaded") == "loaded") { michael@0: response.write("ok(false, 'There was an attempt to preload the image.');"); michael@0: } else { michael@0: response.write("ok(true, 'There was no attempt to preload the image.');"); michael@0: } michael@0: response.write("SimpleTest.finish();"); michael@0: } else { michael@0: setState("loaded", "loaded"); michael@0: response.setHeader("Content-Type", "image/svg", false); michael@0: response.write("Not supposed to load this"); michael@0: } michael@0: }