summaryrefslogtreecommitdiffstats
path: root/toolkit/components/url-classifier/tests/mochitest/dnt.html
blob: effc3a4f8ce468a9d766e1fa2a5b0ca59d9414f5 (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(type) {
  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>