| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
| 5 <script> | 5 <script> |
| 6 description('This tests that the XMLHttpRequest responseType attribute i
s modifiable in the HEADERS_RECEIVED state.'); | 6 description('This tests that the XMLHttpRequest responseType attribute i
s modifiable in the HEADERS_RECEIVED state.'); |
| 7 window.jsTestIsAsync = true; | 7 window.jsTestIsAsync = true; |
| 8 | 8 |
| 9 var xhr = new XMLHttpRequest(); | 9 var xhr = new XMLHttpRequest(); |
| 10 xhr.open('GET', window.location.href); | 10 xhr.open('GET', window.location.href); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 if (xhr.readyState === 2) { | 21 if (xhr.readyState === 2) { |
| 22 // HEADERS_RECEIVED state, set the responseType now | 22 // HEADERS_RECEIVED state, set the responseType now |
| 23 evalAndLog("xhr.responseType = 'document';"); | 23 evalAndLog("xhr.responseType = 'document';"); |
| 24 } else if (xhr.readyState > 2) { | 24 } else if (xhr.readyState > 2) { |
| 25 // LOADING or DONE, so we should get an exception when trying to
set responseType | 25 // LOADING or DONE, so we should get an exception when trying to
set responseType |
| 26 shouldThrow("xhr.responseType = 'text';"); | 26 shouldThrow("xhr.responseType = 'text';"); |
| 27 } | 27 } |
| 28 }; | 28 }; |
| 29 xhr.send(null); | 29 xhr.send(null); |
| 30 </script> | 30 </script> |
| 31 <script src="../js/resources/js-test-post.js"></script> | |
| 32 </head> | 31 </head> |
| 33 <body> | 32 <body> |
| 34 <div id="description"></div> | 33 <div id="description"></div> |
| 35 <div id="console"></div> | 34 <div id="console"></div> |
| 36 </body> | 35 </body> |
| 37 </html> | 36 </html> |
| OLD | NEW |