Reviewed by Darin.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Oct 2006 00:53:10 +0000 (00:53 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Oct 2006 00:53:10 +0000 (00:53 +0000)
        - test case that ensures Referer[sic] header is sent

        * http/tests/misc/referrer-expected.txt: Added.
        * http/tests/misc/referrer.html: Added.
        * http/tests/misc/resources/referrer-result.php: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16950 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/misc/referrer-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/misc/referrer.html [new file with mode: 0644]
LayoutTests/http/tests/misc/resources/referrer-result.php [new file with mode: 0644]

index 9066021e52b68d5b409b380541d9e13499f6ef23..f09aa5ae7ff47b22cf8786fed3ca4c43b2b32283 100644 (file)
@@ -1,3 +1,13 @@
+2006-10-09  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+        
+        - test case that ensures Referer[sic] header is sent
+
+        * http/tests/misc/referrer-expected.txt: Added.
+        * http/tests/misc/referrer.html: Added.
+        * http/tests/misc/resources/referrer-result.php: Added.
+
 2006-10-09  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Oliver.
 2006-10-09  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Oliver.
diff --git a/LayoutTests/http/tests/misc/referrer-expected.txt b/LayoutTests/http/tests/misc/referrer-expected.txt
new file mode 100644 (file)
index 0000000..0f3363c
--- /dev/null
@@ -0,0 +1 @@
+PASS: Referer header exists and contains the string 'referrer.html'.
diff --git a/LayoutTests/http/tests/misc/referrer.html b/LayoutTests/http/tests/misc/referrer.html
new file mode 100644 (file)
index 0000000..c8f8093
--- /dev/null
@@ -0,0 +1,8 @@
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+window.location = 'resources/referrer-result.php';
+</script>
diff --git a/LayoutTests/http/tests/misc/resources/referrer-result.php b/LayoutTests/http/tests/misc/resources/referrer-result.php
new file mode 100644 (file)
index 0000000..1689c4f
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+<body>
+<script>
+
+var referer = "<?php $headers = getallheaders(); echo $headers["Referer"]; ?>";
+if (referer.match(/referrer.html/)) {
+    document.write("PASS: Referer header exists and contains the string 'referrer.html'.");
+} else {
+    document.write("FAIL: Referer header does not contain the string 'referrer.html', value is '" + referer + "'");
+}
+
+if (window.layoutTestController)
+    layoutTestController.notifyDone();
+</script>
+
+</body>
+</html>