Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / small-chunks-response-text.html
blobe3eb4319aaf3000f80fb60b78e924b71e1db7c82
1 <html>
2 <script>
3 if (window.testRunner) {
4 testRunner.dumpAsText();
5 testRunner.waitUntilDone();
8 function debug(str) {
9 var li = document.createElement('li');
10 li.appendChild(document.createTextNode(str));
11 document.getElementById('console').appendChild(li);
14 function processStateChange() {
15 if (req.readyState == 3) {
16 debug(count++ + ' responseText: ' + req.responseText);
17 } else if (req.readyState == 4) {
18 if (window.testRunner)
19 testRunner.notifyDone();
23 function runTest() {
24 count = 0;
26 req = new XMLHttpRequest();
28 req.open('GET', 'resources/small-chunks.cgi', true);
29 req.onreadystatechange = processStateChange;
30 req.send(null);
32 </script>
33 <body onload="runTest()">
34 <div>This tests that an open XMLHttpRequest connection will call onreadystatechange correctly when data is sent over an open connection.</div>
35 <ul id="console"></li>
36 </body>
37 </html>