diff options
Diffstat (limited to 'LayoutTests/http/tests/ssl')
9 files changed, 65 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/ssl/referer-301-expected.txt b/LayoutTests/http/tests/ssl/referer-301-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/http/tests/ssl/referer-301-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/http/tests/ssl/referer-301.html b/LayoutTests/http/tests/ssl/referer-301.html new file mode 100644 index 0000000..2764a7e --- /dev/null +++ b/LayoutTests/http/tests/ssl/referer-301.html @@ -0,0 +1,14 @@ +<body> +<a href="redir.php">Click me.<a/> The resulting request (as dumped on screen) should not have a Referer header. +<script> +if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); +} + +if (location.protocol != "https:") + location = "https://127.0.0.1:8443/ssl/referer-301.html"; +else + location = "resources/referer-301-redir.php"; +</script> +</body> diff --git a/LayoutTests/http/tests/ssl/referer-303-expected.txt b/LayoutTests/http/tests/ssl/referer-303-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/http/tests/ssl/referer-303-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/http/tests/ssl/referer-303.html b/LayoutTests/http/tests/ssl/referer-303.html new file mode 100644 index 0000000..b6a3c2e --- /dev/null +++ b/LayoutTests/http/tests/ssl/referer-303.html @@ -0,0 +1,14 @@ +<body> +<a href="redir.php">Click me.<a/> The resulting request (as dumped on screen) should not have a Referer header. +<script> +if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); +} + +if (location.protocol != "https:") + location = "https://127.0.0.1:8443/ssl/referer-303.html"; +else + location = "resources/referer-303-redir.php"; +</script> +</body> diff --git a/LayoutTests/http/tests/ssl/resources/no-http-referer.cgi b/LayoutTests/http/tests/ssl/resources/no-http-referer.cgi new file mode 100755 index 0000000..273d03c --- /dev/null +++ b/LayoutTests/http/tests/ssl/resources/no-http-referer.cgi @@ -0,0 +1,18 @@ +#!/usr/bin/perl -wT +use strict; + +print "Content-Type: text/html\n"; +print "Cache-Control: no-store\n\n"; + +my $failed = 0; +foreach (keys %ENV) { + if ($_ =~ "HTTP_REFERER") { + print "FAIL. " . $_ . ": " . $ENV{$_} . "\n"; + $failed = 1; + } +} +if (!$failed) { + print "PASS\n"; +} + +print "<script>if (window.layoutTestController) layoutTestController.notifyDone()</script>"; diff --git a/LayoutTests/http/tests/ssl/resources/referer-301-redir.php b/LayoutTests/http/tests/ssl/resources/referer-301-redir.php new file mode 100644 index 0000000..d93dc7a --- /dev/null +++ b/LayoutTests/http/tests/ssl/resources/referer-301-redir.php @@ -0,0 +1,5 @@ +<?php +header("HTTP/1.1 301 Moved Permanently"); +header("Location: http://127.0.0.1:8000/ssl/resources/no-http-referer.cgi"); +header("Cache-Control: no-cache,no-store"); +?> diff --git a/LayoutTests/http/tests/ssl/resources/referer-303-redir.php b/LayoutTests/http/tests/ssl/resources/referer-303-redir.php new file mode 100644 index 0000000..63f859d --- /dev/null +++ b/LayoutTests/http/tests/ssl/resources/referer-303-redir.php @@ -0,0 +1,5 @@ +<?php +header("HTTP/1.1 303 See Other"); +header("Location: http://127.0.0.1:8000/ssl/resources/no-http-referer.cgi"); +header("Cache-Control: no-cache,no-store"); +?> diff --git a/LayoutTests/http/tests/ssl/verify-ssl-enabled-expected.txt b/LayoutTests/http/tests/ssl/verify-ssl-enabled-expected.txt new file mode 100644 index 0000000..20c6407 --- /dev/null +++ b/LayoutTests/http/tests/ssl/verify-ssl-enabled-expected.txt @@ -0,0 +1 @@ +HTTPS is on! diff --git a/LayoutTests/http/tests/ssl/verify-ssl-enabled.php b/LayoutTests/http/tests/ssl/verify-ssl-enabled.php new file mode 100644 index 0000000..de1158b --- /dev/null +++ b/LayoutTests/http/tests/ssl/verify-ssl-enabled.php @@ -0,0 +1,6 @@ +<script> + if (window.layoutTestController) + layoutTestController.dumpAsText(); +</script> + +HTTPS is <?= $_SERVER['HTTPS'] ?>! |