1 <head><meta charset=
"utf-8"></head>
3 <p>Test how URLs are encoded.
</p>
8 var item
= document
.createElement("li");
9 item
.appendChild(document
.createTextNode(message
));
10 document
.getElementById("result").appendChild(item
);
13 if (window
.testRunner
)
14 testRunner
.dumpAsText();
16 var req
= new XMLHttpRequest
;
17 req
.open("GET", "/xmlhttprequest/resources/print-query.cgi?Проверка", false);
19 log("abs-path: " + (req
.responseText
== "%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0" ? "PASS" : "FAIL (" + req
.responseText
+ ")"));
21 req
.open("GET", "resources/print-query.cgi?Проверка", false);
23 log("rel-path: " + (req
.responseText
== "%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0" ? "PASS" : "FAIL (" + req
.responseText
+ ")"));
25 req
.open("GET", document
.URL
.replace(/encode-request-url\.html/, "") + "resources/print-query.cgi?Проверка", false);
27 log("absolute: " + (req
.responseText
== "%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0" ? "PASS" : "FAIL (" + req
.responseText
+ ")"));