7 <script src=
"/js-test-resources/js-test.js"></script>
9 description('This test verifies that XMLHttpRequest properly handles Content-Type when it is reused.');
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var req
= new XMLHttpRequest
;
15 req
.open("GET", "resources/get-utf-8.cgi", false);
17 shouldBeEqualToString("req.getResponseHeader('Content-Type')", "text/plain; charset=utf-8");
18 shouldBeEqualToString("req.responseText", "Проверка");
19 req
.open("GET", "resources/get-windows-1251.cgi", false);
21 shouldBeEqualToString("req.getResponseHeader('Content-Type')", "text/plain; charset=windows-1251");
22 shouldBeEqualToString("req.responseText", "Проверка");
25 fail("an exception is thrown: " + ex
);