Use testRunner instead of layoutTestController in tests still found to be using layou...
[WebKit-https.git] / LayoutTests / http / tests / uri / resolve-encoding-relative.html
1 <meta charset=windows-1251>
2 <body>
3 <p>Test how non-ASCII characters are encoded in relative URLs.</p>
4 <a href="?çàïðîñ">1</a>
5 <a href="#ôðàãìåíò">2</a>
6 <a href="ïóòü">3</a>
7 <a href="/ïóòü">4</a>
8 <a href="/ïóòü?çàïðîñ#ôðàãìåíò">5</a>
9 <pre id=result></pre>
10 <script>
11 if (window.testRunner)
12     testRunner.dumpAsText();
13
14 function log(message)
15 {
16     document.getElementById("result").innerHTML += message + "\n";
17 }
18
19 // Everything except for query (search) part is encoded as UTF-8 in Firefox.
20 log("1. " + (document.getElementsByTagName("a")[0].href.match(/%E7%E0%EF%F0%EE%F1$/) ? "PASS" : "FAIL: " + document.getElementsByTagName("a")[0].href));
21 log("2. " + (document.getElementsByTagName("a")[1].href.match(/#%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82$/) ? "PASS" : "FAIL: " + document.getElementsByTagName("a")[1].href));
22 log("3. " + (document.getElementsByTagName("a")[2].href.match(/%D0%BF%D1%83%D1%82%D1%8C$/) ? "PASS" : "FAIL: " + document.getElementsByTagName("a")[2].href));
23 log("4. " + (document.getElementsByTagName("a")[3].href.match(/%D0%BF%D1%83%D1%82%D1%8C$/) ? "PASS" : "FAIL: " + document.getElementsByTagName("a")[3].href));
24 log("5. " + (document.getElementsByTagName("a")[4].href.match(/%D0%BF%D1%83%D1%82%D1%8C\?%E7%E0%EF%F0%EE%F1#%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82$/) ? "PASS" : "FAIL: " + document.getElementsByTagName("a")[4].href));
25 </script>
26 </body>