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