diff options
Diffstat (limited to 'testing/web-platform/tests/https-upgrades/tentative/http-redirecting-to-http-redirecting-to-http.https.sub.html')
-rw-r--r-- | testing/web-platform/tests/https-upgrades/tentative/http-redirecting-to-http-redirecting-to-http.https.sub.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/https-upgrades/tentative/http-redirecting-to-http-redirecting-to-http.https.sub.html b/testing/web-platform/tests/https-upgrades/tentative/http-redirecting-to-http-redirecting-to-http.https.sub.html new file mode 100644 index 0000000000..96892c95a9 --- /dev/null +++ b/testing/web-platform/tests/https-upgrades/tentative/http-redirecting-to-http-redirecting-to-http.https.sub.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> + <head> + <title>HTTPS Upgrades: HTTP URL redirecting to HTTP URL redirecting to HTTP URL</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/get-host-info.sub.js"></script> + + </head> + <body> + <script> + setup({ single_test: true }); + // Loads an HTTP URL that redirects to an HTTP URL that redirects to + // another HTTP URL. HTTPS upgrading should upgrade all URLs to HTTPS. + // + // HTTPS upgrading doesn't change custom ports, so this will load + // correctly if an HTTPS upgrade is performed, and will fail to load + // otherwise (since the port will be wrong for http). + var final_url = "http://{{host}}:{{ports[https][0]}}/https-upgrades/resources/pass.html"; + var middle_url = "http://{{host}}:{{ports[https][0]}}/fetch/api/resources/redirect.py?location=" + final_url; + var url = new URL("http://{{host}}:{{ports[https][0]}}/fetch/api/resources/redirect.py?location=" + middle_url); + window.onmessage = function(event) { + if (event.data === "pass") { + done(); + } + } + win = window.open(url) + </script> + </body> +</html> |