summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/referrer.sjs
blob: dcfd1fe3725750a7f6768dc24a2ab39d2c7c1bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function handleRequest(request, response)
{
  if (request.queryString == "result") {
    response.write(getState("referer"));
    setState("referer", "INVALID");
  } else if (request.queryString == "worker") {
    response.setHeader("Content-Type", "text/javascript", false);
    response.write("onmessage = function() { postMessage(42); }");
    setState("referer", request.getHeader("referer"));
  } else if (request.queryString == 'import') {
    setState("referer", request.getHeader("referer"));
    response.write("'hello world'");
  }
}