summaryrefslogtreecommitdiffstats
path: root/toolkit/components/url-classifier/tests/mochitest/dnt.html
blob: 2ce66d4961d606f36ad45c6c3f936aff9bef9c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
<title></title>

<script type="text/javascript">

function makeXHR(url, callback) {
  var xhr = new XMLHttpRequest();
  xhr.open("GET", url, true);
  xhr.onload = function() {
    callback(xhr.response);
  };
  xhr.send();
}

function loaded() {
  window.parent.postMessage("navigator.doNotTrack=" + navigator.doNotTrack, "*");

  makeXHR("dnt.sjs", (res) => {
    window.parent.postMessage("DNT=" + res, "*");
    window.parent.postMessage("finish", "*");
  });
}

</script>
</head>

<body onload="loaded('onload')">
</body>

</html>