Reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2006 19:07:00 +0000 (19:07 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2006 19:07:00 +0000 (19:07 +0000)
        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9572
        Add application/xhtml+xml to the Accept header

        The fix itself was landed on 2006-07-09, but I forgot about the test.

        * http/tests/misc/xhtml-expected.txt: Added.
        * http/tests/misc/xhtml.php: Added.

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

LayoutTests/ChangeLog
LayoutTests/http/tests/misc/xhtml-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/misc/xhtml.php [new file with mode: 0644]

index d796191c111d28ce3097dad60c5208f6512c6394..48492824eca4d2e6ef586e2910ba804cb21ee45a 100644 (file)
@@ -1,3 +1,15 @@
+2006-07-11  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Darin.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9572
+        Add application/xhtml+xml to the Accept header
+
+        The fix itself was landed on 2006-07-09, but I forgot about the test.
+
+        * http/tests/misc/xhtml-expected.txt: Added.
+        * http/tests/misc/xhtml.php: Added.
+
 2006-07-11  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Adele.
diff --git a/LayoutTests/http/tests/misc/xhtml-expected.txt b/LayoutTests/http/tests/misc/xhtml-expected.txt
new file mode 100644 (file)
index 0000000..df9be77
--- /dev/null
@@ -0,0 +1,3 @@
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+
+PASS: The browser asks for XHTML.
diff --git a/LayoutTests/http/tests/misc/xhtml.php b/LayoutTests/http/tests/misc/xhtml.php
new file mode 100644 (file)
index 0000000..2b8aaf4
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+<body>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+var accept = "<?php $headers = getallheaders(); echo $headers["Accept"]; ?>";
+document.write("Accept: " + accept + "<br><br>");
+if (accept.match(/application\/xhtml\+xml/)) {
+    document.write("PASS: The browser asks for XHTML.");
+} else {
+    document.write("FAIL: The browser doesn't ask for XHTML");
+}
+</script>
+
+</body>
+</html>