summaryrefslogtreecommitdiffstats
path: root/parser/htmlparser/tests/reftest/vs-non-ascii-in-comment-before.sjs
blob: 12b1919ff8fa1408fce2d84e76ae184068dbfbd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var timer; // Place timer in global scope to avoid it getting GC'ed prematurely

function handleRequest(request, response)
{
  response.setHeader("Cache-Control", "no-cache", false);
  response.setHeader("Content-Type", "text/html", false);
  response.write('<!DOCTYPE html>\n<head>\n<link rel="match" href="references/non-ascii-in-comment-before-ref.html">\n<!-- \u00E6 -->\n');
  response.bodyOutputStream.flush();
  response.processAsync();
  timer = Components.classes["@mozilla.org/timer;1"]
    .createInstance(Components.interfaces.nsITimer);
  timer.initWithCallback(function() {
    response.write('<meta charset="windows-1251">\n</head>\n<body>\n<p>Normal meta. Non-ASCII in comment before.</p>\n<p>Test: \u00E6</p>\n<p>If &#x0436;, meta takes effect</p>\n</body>\n');
    response.finish();
  }, 10, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
}