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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/js-test-resources/js-test-pre.js"></script> 4 <script src="/js-test-resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description('This tests that XMLHttpRequest overrideMimeType() properly updates the Content-Type header for the response.'); 8 description('This tests that XMLHttpRequest overrideMimeType() properly updates the Content-Type header for the response.');
9 window.jsTestIsAsync = true; 9 window.jsTestIsAsync = true;
10 10
11 var xhr = new XMLHttpRequest(); 11 var xhr = new XMLHttpRequest();
12 var url = 'resources/reply.xml'; 12 var url = 'resources/reply.xml';
13 13
14 xhr.onreadystatechange = function () { 14 xhr.onreadystatechange = function () {
15 if (xhr.readyState == xhr.LOADING) { 15 if (xhr.readyState == xhr.LOADING) {
16 shouldBe('xhr.getResponseHeader("Content-Type")', '"text/xml;cha rset=GBK"'); 16 shouldBe('xhr.getResponseHeader("Content-Type")', '"text/xml;cha rset=GBK"');
17 finishJSTest(); 17 finishJSTest();
18 } 18 }
19 } 19 }
20 20
21 xhr.onerror = function() { 21 xhr.onerror = function() {
22 testFailed('The XHR request to an existing resource failed: "' + url + '"'); 22 testFailed('The XHR request to an existing resource failed: "' + url + '"');
23 finishJSTest(); 23 finishJSTest();
24 }; 24 };
25 25
26 xhr.open('GET', url); 26 xhr.open('GET', url);
27 xhr.overrideMimeType('text/xml;charset=GBK'); 27 xhr.overrideMimeType('text/xml;charset=GBK');
28 xhr.send(); 28 xhr.send();
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698