Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / xmlhttprequest-json-response-overflow.html
blobb854bdfae2d5e74628aca342a0c65f93541c41b4
1 <html>
2 <body>
3 Verify that XMLHttpRequest handles string overflows.<br/>
4 You should see PASSED once.<br/>
6 <script type="text/javascript">
8 function log (msg)
10 document.body.appendChild(document.createTextNode(msg));
13 var xhr = new XMLHttpRequest;
14 xhr.responseType = 'json';
15 xhr.onreadystatechange = function() {
16 if (xhr.readyState != 4)
17 return;
18 log((xhr.response === null && (xhr.status === 200)) ? "PASSED" : "FAILED");
19 if (window.testRunner)
20 testRunner.notifyDone();
22 xhr.open("GET", "resources/json-response-overflow.php", true);
23 xhr.send(null);
25 if (window.testRunner) {
26 testRunner.dumpAsText();
27 testRunner.waitUntilDone();
30 </script>
31 </body>
32 </html>