Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="/js-test-resources/js-test.js"></script> | 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <script> | 3 <script> |
| 4 jsTestIsAsync = true; | 4 jsTestIsAsync = true; |
| 5 | 5 |
| 6 var xhr = new XMLHttpRequest(); | 6 var xhr = new XMLHttpRequest(); |
| 7 xhr.responseType = 'document'; | 7 xhr.responseType = 'document'; |
| 8 xhr.onreadystatechange = function () { | 8 xhr.onreadystatechange = function () { |
| 9 if (this.readyState != XMLHttpRequest.DONE) { | 9 if (this.readyState != XMLHttpRequest.DONE) { |
| 10 // avoid showing PASS messages via shouldBeNull, as we have no guarantee how many 'readystatechange' we would receive. | 10 // avoid showing PASS messages via shouldBeNull, as we have no guarantee how many 'readystatechange' we would receive. |
| 11 if (xhr.responseXML !== null) | 11 if (xhr.responseXML !== null) |
| 12 testFailed("response HTML was visible before DONE") | 12 testFailed("response HTML was visible before DONE") |
| 13 return; | 13 return; |
| 14 } | 14 } |
| 15 | 15 |
| 16 shouldBeNonNull("xhr.responseXML"); | 16 shouldBeNonNull("xhr.responseXML"); |
| 17 testRunner.notifyDone(); | 17 testRunner.notifyDone(); |
| 18 } | 18 } |
| 19 | 19 |
| 20 xhr.open("GET", "resources/small-chunks.cgi", true); | 20 xhr.open("GET", "resources/test.html", true); |
|
kouhei (in TOK)
2014/11/14 07:40:52
The reason I used small-chunks here is to test tha
yhirano
2014/11/14 08:56:56
Done.
| |
| 21 xhr.send(null); | 21 xhr.send(null); |
| 22 </script> | 22 </script> |
| OLD | NEW |