summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/resource-timing/resources/fake_responses_https_redirect.sub.html
blob: 2ee92b2a5511c0d43359e0db7ee3b64ae5f9115c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<body>
<script>
function request() {
  var client = new XMLHttpRequest,
      baseurl = "http://{{hosts[alt][]}}:{{ports[http][0]}}{{location[pathname]}}",
      subresource = "fake_responses.py",
      redirecturl = new URL(subresource, "https://{{hosts[][www]}}:{{ports[https][0]}}{{location[pathname]}}").href,
      url = new URL(subresource + "?redirect=" + redirecturl, baseurl).href;
    client.open("GET", url, false)
    client.send(null)
    client.open("GET", url, false)
    client.send(null)
}

if(window.parent.setup_iframe) {
  window.parent.setup_iframe();
  request();
}
</script>
</body>