summaryrefslogtreecommitdiffstats
path: root/LayoutTests
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-11-04 12:10:40 +0000
committerIain Merrick <husky@google.com>2010-11-04 13:21:52 +0000
commit387bdab048790ba9d6585e963a4d26a3b98e675c (patch)
tree9adbb76070eb7c95b2fe2458b151f7e6a4bdd4df /LayoutTests
parentd5a8aa497723e8ab3b77f0ecb8c9c6cc7ab5d7b0 (diff)
downloadexternal_webkit-387bdab048790ba9d6585e963a4d26a3b98e675c.zip
external_webkit-387bdab048790ba9d6585e963a4d26a3b98e675c.tar.gz
external_webkit-387bdab048790ba9d6585e963a4d26a3b98e675c.tar.bz2
Add SSL layout tests at WebKit r70209.
Only 3 tests, all passing. See http://b/issue?id=3164771 Change-Id: I2f3b03969a97618f1d4ba9dd91d782e1814914f0
Diffstat (limited to 'LayoutTests')
-rw-r--r--LayoutTests/http/tests/ssl/referer-301-expected.txt1
-rw-r--r--LayoutTests/http/tests/ssl/referer-301.html14
-rw-r--r--LayoutTests/http/tests/ssl/referer-303-expected.txt1
-rw-r--r--LayoutTests/http/tests/ssl/referer-303.html14
-rwxr-xr-xLayoutTests/http/tests/ssl/resources/no-http-referer.cgi18
-rw-r--r--LayoutTests/http/tests/ssl/resources/referer-301-redir.php5
-rw-r--r--LayoutTests/http/tests/ssl/resources/referer-303-redir.php5
-rw-r--r--LayoutTests/http/tests/ssl/verify-ssl-enabled-expected.txt1
-rw-r--r--LayoutTests/http/tests/ssl/verify-ssl-enabled.php6
-rwxr-xr-xLayoutTests/platform/android/layout_test_directories.txt1
10 files changed, 66 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'] ?>!
diff --git a/LayoutTests/platform/android/layout_test_directories.txt b/LayoutTests/platform/android/layout_test_directories.txt
index 3b63850..a6abb82 100755
--- a/LayoutTests/platform/android/layout_test_directories.txt
+++ b/LayoutTests/platform/android/layout_test_directories.txt
@@ -38,6 +38,7 @@ fast/xpath
http/conf
http/tests/appcache
http/tests/resources
+http/tests/ssl
platform/android
platform/android-v8
storage