Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/reopen-encoding.html

Issue 20625004: XMLHttpRequest should clear the response encoding when it clears responseText. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/reopen-encoding-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title>hello</title>
4 <meta charset="UTF-8">
5 </head>
6 <body>
7 <script src="/js-test-resources/js-test-pre.js"></script>
8 <script>
9 description('This test verifies that XMLHttpRequest properly handles Content -Type when it is reused.');
10 if (window.testRunner)
11 testRunner.dumpAsText();
12
13 var req = new XMLHttpRequest;
14 try {
15 req.open("GET", "resources/get-utf-8.cgi", false);
16 req.send();
17 shouldBeEqualToString("req.getResponseHeader('Content-Type')", "text/pla in; charset=utf-8");
18 shouldBeEqualToString("req.responseText", "Проверка");
19 req.open("GET", "resources/get-windows-1251.cgi", false);
20 req.send();
21 shouldBeEqualToString("req.getResponseHeader('Content-Type')", "text/pla in; charset=windows-1251");
22 shouldBeEqualToString("req.responseText", "Проверка");
23 finishJSTest();
24 } catch (ex) {
25 fail("an exception is thrown: " + ex);
26 }
27 </script>
28 <script src="/js-test-resources/js-test-post.js"></script>
29 </body>
30 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/reopen-encoding-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698