parser/htmlparser/tests/mochitest/file_bug642908.sjs
author Michael Wu <mwu@mozilla.com>
Sat, 06 Aug 2011 22:03:32 -0700
changeset 73984 f7dc94e1b75cb1a755a4872176602433bb33c2ba
parent 68700 557165a66267f01c4a3459eb861647bb117850c7
permissions -rw-r--r--
Bug 676465 - Replace PRBool with boolean in IDL files, r=bsmedberg

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