2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / anchor-backslash.html
blobd41f3e33a422cd239b0aacb861d478a6d73c65ad
1 <html>
2 <head>
3 <script type="text/javascript">
4 function log(message)
6 var item = document.createElement("li");
7 item.appendChild(document.createTextNode(message));
8 document.getElementById("console").appendChild(item);
10 function test()
12 if (window.layoutTestController)
13 layoutTestController.dumpAsText();
14 log("paths like this should turn all \\ characters into /: \"" + document.getElementById("1").pathname + "\"");
15 log("query strings like this one should still have \\ characters: \"" + document.getElementById("2").search + "\"");
16 log("query strings like this one should still have \\ characters even if the URL is only a query: \"" + document.getElementById("3").search + "\"");
17 log("anchor strings like this one should still have \\ characters: \"" + document.getElementById("4").hash + "\"");
18 log("anchor strings like this one should still have \\ characters even if the URL is only an anchor: \"" + document.getElementById("5").hash + "\"");
20 </script>
21 </head>
22 <body onload="test()">
23 <p>This tests \ characters being changed to / in anchor tags.</p>
24 <p>If it works you should see five messages below that have \ or / characters as specified.</p>
25 <hr>
26 <a id="1" href="file:\\\a\b\c\">1</a>
27 <a id="2" href="file:///?path=\\a\b\c\">2</a>
28 <a id="3" href="?path=\\myshare\myfolder\myfile\">3</a>
29 <a id="4" href="file:///#path=\\a\b\c\">4</a>
30 <a id="5" href="#path=\\myshare\myfolder\myfile\">5</a>
31 <hr>
32 <p><ol id="console"></ol></p>
33 </body>
34 </html>