summaryrefslogtreecommitdiffstats
path: root/dom/base/test/file_bug503473-frame.sjs
blob: 5a78292fb4c39417823ab647df6f52824425aec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function handleRequest(request, response) {
  response.processAsync();
  response.setStatusLine(request.httpVersion, 200, "OK");
  response.setHeader("Content-Type", "text/html; charset=utf-8", false);
  response.setHeader("Cache-Control", "no-cache", false);

  response.write(
    '<!DOCTYPE html>' +
    '<div></div>' +
    '<script>' +
    'function doWrite() {' +
    '  document.write("<p></p>");' +
    '  parent.done();' +
    '  document.close();' +
    '}' +
    'setTimeout(doWrite, 0);' +
    '</script>' 
  );

  response.bodyOutputStream.flush();
  // leave the stream open
}