Reviewed by Darin.
[WebKit-https.git] / LayoutTests / fast / loader / url-strip-cr-lf-tab.html
1 <body>
2 Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=8770">bug 8770</a>: 
3 XMLHttpRequest should strip CR/LF characters from the URL (not just XMLHttpRequest, really, and TAB is also stripped).
4
5 <script>
6 if (window.layoutTestController) {
7     layoutTestController.dumpAsText();
8     layoutTestController.waitUntilDone();
9 }
10
11 if (document.URL.indexOf('?') == -1) {
12
13         window.location.href = "url-strip-cr-lf-tab\x09\x0a\x0d.html?a=b\x09\x0a\x0d#\x09\x0a\x0dc";
14
15 } else {
16
17         if (document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) == "a=b#c")
18                 document.write("<p>Success</p>");
19         else
20                 document.write("<p>Failure</p>");
21         
22         if (window.layoutTestController)
23                 layoutTestController.notifyDone();
24 }
25 </script>
26 </body>