Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / test / data / referrer_policy / referrer-policy-start.html
blobc73740342a9b44de39e763cbe798af985e790f43
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function run() {
6 var kPolicy = 1;
7 var kRedirect = 2;
8 var kLink = 3;
9 var kTarget = 4;
10 var re = new RegExp("policy=(.*)&redirect=(.*)&link=(.*)&target=(.*)");
11 var matches = re.exec(document.location.search);
13 if (matches == null) {
14 document.body.innerText = "Could not parse parameters!";
15 return;
18 if (matches[kPolicy] != "no-meta") {
19 var meta = document.createElement("meta");
20 meta.name = "referrer";
21 meta.content = matches[kPolicy];
22 document.head.appendChild(meta);
25 var destination;
26 var redirectMatches;
28 if (matches[kRedirect] == "none") {
29 destination = "http://mock.http/referrer_policy/referrer-policy-log.html";
30 } else if (redirectMatches = /^(https?)2(https?)$/.exec(matches[kRedirect])) {
31 destination =
32 redirectMatches[1] +
33 "://mock.http/referrer_policy/redirect-to-" +
34 redirectMatches[2] + "-log";
35 } else {
36 destination = matches[kRedirect];
39 if (matches[kLink] == "true") {
40 var link = document.createElement("a");
41 link.innerText = "link";
42 link.target = matches[kTarget];
43 link.href = destination;
44 document.body.appendChild(link);
45 } else {
46 document.location = destination;
49 </script>
50 </head>
51 <body onload="run()">
52 </body>
53 </html>