| <html> |
| <head> |
| <script type="text/javascript"> |
| function log(message) |
| { |
| var item = document.createElement("li"); |
| item.appendChild(document.createTextNode(message)); |
| document.getElementById("console").appendChild(item); |
| } |
| function test() |
| { |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| log("paths like this should turn all \\ characters into /: \"" + document.getElementById("1").pathname + "\""); |
| log("query strings like this one should still have \\ characters: \"" + document.getElementById("2").search + "\""); |
| log("query strings like this one should still have \\ characters even if the URL is only a query: \"" + document.getElementById("3").search + "\""); |
| log("anchor strings like this one should still have \\ characters: \"" + document.getElementById("4").hash + "\""); |
| log("anchor strings like this one should still have \\ characters even if the URL is only an anchor: \"" + document.getElementById("5").hash + "\""); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| <p>This tests \ characters being changed to / in anchor tags.</p> |
| <p>If it works you should see five messages below that have \ or / characters as specified.</p> |
| <hr> |
| <a id="1" href="file:\\\a\b\c\">1</a> |
| <a id="2" href="file:///?path=\\a\b\c\">2</a> |
| <a id="3" href="?path=\\myshare\myfolder\myfile\">3</a> |
| <a id="4" href="file:///#path=\\a\b\c\">4</a> |
| <a id="5" href="#path=\\myshare\myfolder\myfile\">5</a> |
| <hr> |
| <p><ol id="console"></ol></p> |
| </body> |
| </html> |