1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/htmlparser/tests/mochitest/file_bug642908.sjs Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +function handleRequest(request, response) 1.5 +{ 1.6 + if (request.queryString.indexOf("report") != -1) { 1.7 + response.setHeader("Content-Type", "text/javascript", false); 1.8 + if (getState("loaded") == "loaded") { 1.9 + response.write("ok(false, 'There was an attempt to preload the image.');"); 1.10 + } else { 1.11 + response.write("ok(true, 'There was no attempt to preload the image.');"); 1.12 + } 1.13 + response.write("SimpleTest.finish();"); 1.14 + } else { 1.15 + setState("loaded", "loaded"); 1.16 + response.setHeader("Content-Type", "image/svg", false); 1.17 + response.write("<svg xmlns='http://www.w3.org/2000/svg'>Not supposed to load this</svg>"); 1.18 + } 1.19 +}