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

Side by Side Diff: LayoutTests/fast/xmlhttprequest/xmlhttprequest-set-responsetype.html

Issue 18883002: Add Streams API support to XMLHttpRequest (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: kinuko's comment Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/xmlhttprequest/xmlhttprequest-set-responsetype-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
1 <html> 1 <html>
2 <body> 2 <body>
3 <div id="description"></div> 3 <div id="description"></div>
4 <div id="console"></div> 4 <div id="console"></div>
5 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="../js/resources/js-test-pre.js"></script>
6 <script> 6 <script>
7 description('This test checks if setting non-supported type does not throw an ex ception'); 7 description('This test checks if setting non-supported type does not throw an ex ception');
8 8
9 var xhr = new XMLHttpRequest(); 9 var xhr = new XMLHttpRequest();
10 xhr.open('GET', 'resources/plist.app', true); 10 xhr.open('GET', 'resources/plist.app', true);
11 11
12 // Setting valid type does change the responseType value. 12 // Setting valid type does change the responseType value.
13 ["", "arraybuffer", "blob", "document", "json", "text"].forEach(function(type) { 13 ["", "arraybuffer", "blob", "document", "json", "text", "stream"].forEach(functi on(type) {
14 xhr.responseType = type; 14 xhr.responseType = type;
15 shouldBeEqualToString('xhr.responseType', type); 15 shouldBeEqualToString('xhr.responseType', type);
16 }); 16 });
17 17
18 // Setting invalid type should not throw an exception. 18 // Setting invalid type should not throw an exception.
19 shouldNotThrow('xhr.responseType = "dkjdfkjdfkj"'); 19 shouldNotThrow('xhr.responseType = "dkjdfkjdfkj"');
20 20
21 // Setting invalid type doesn not change the responseType value. 21 // Setting invalid type doesn not change the responseType value.
22 shouldBeEqualToString('xhr.responseType = "text"; xhr.responseType = "asdfasdfas d"; xhr.responseType', 'text'); 22 shouldBeEqualToString('xhr.responseType = "text"; xhr.responseType = "asdfasdfas d"; xhr.responseType', 'text');
23 23
24 </script> 24 </script>
25 <script src="../js/resources/js-test-post.js"></script> 25 <script src="../js/resources/js-test-post.js"></script>
26 </body> 26 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/xmlhttprequest/xmlhttprequest-set-responsetype-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698