2 <script src=
"/js-test-resources/js-test.js"></script>
6 var xhr
= new XMLHttpRequest();
7 xhr
.responseType
= 'document';
8 xhr
.onreadystatechange = function () {
9 if (this.readyState
!= XMLHttpRequest
.DONE
) {
10 // avoid showing PASS messages via shouldBeNull, as we have no guarantee how many 'readystatechange' we would receive.
11 if (xhr
.responseXML
!== null)
12 testFailed("response HTML was visible before DONE")
16 shouldBeNonNull("xhr.responseXML");
17 testRunner
.notifyDone();
20 xhr
.open("GET", "resources/small-chunks.cgi", true);