File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -267,6 +267,25 @@ export function test_xhr_events() {
267267 TKUnit . assertEqual ( errorEventData , 'error data' ) ;
268268}
269269
270+ export function test_xhr_responseType_rss ( ) {
271+ const xhr = < any > new XMLHttpRequest ( ) ;
272+ const rawRssFeed = '<rss> <channel><item><title>Test</title></item></channel></rss>' ;
273+ const response = {
274+ statusCode : 200 ,
275+ content : {
276+ toString : function ( ) { return this . raw } ,
277+ raw : rawRssFeed
278+ } ,
279+ headers : {
280+ "Content-Type" : "application/rss+xml"
281+ }
282+ }
283+
284+ xhr . _loadResponse ( response ) ;
285+ TKUnit . assertEqual ( xhr . responseType , "text" ) ;
286+ TKUnit . assertEqual ( xhr . response , rawRssFeed ) ;
287+ }
288+
270289export function test_xhr_responseType_text ( ) {
271290 const xhr = < any > new XMLHttpRequest ( ) ;
272291 const response = {
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ export class XMLHttpRequest {
131131 private textTypes : string [ ] = [
132132 'text/plain' ,
133133 'application/xml' ,
134+ 'application/rss+xml' ,
134135 'text/html' ,
135136 'text/xml'
136137 ] ;
You can’t perform that action at this time.
0 commit comments