| Index: LayoutTests/http/tests/xmlhttprequest/xhr-onload.html
|
| diff --git a/LayoutTests/http/tests/xmlhttprequest/xhr-onload.html b/LayoutTests/http/tests/xmlhttprequest/xhr-onload.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1a35abc42b235606c4723edf807bc794adb12540
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/xmlhttprequest/xhr-onload.html
|
| @@ -0,0 +1,42 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +</head>
|
| +<body>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +<script>
|
| +description("Request a file as the Text type with asynchronous XMLHttpRequest in a document context.");
|
| +window.jsTestIsAsync = true;
|
| +document.body.onload = function() {
|
| +var xhr = new XMLHttpRequest();
|
| +xhr.open('GET', 'resources/test.html?0');
|
| +xhr.send();
|
| +xhr.onreadystatechange = function() {
|
| + if (xhr.readyState === 4) {
|
| + debug('xhr.readyState === 4');
|
| + }
|
| +};
|
| +
|
| +xhr.onerror = function() {
|
| + debug('FAIL0: onerror');
|
| + finishJSTest();
|
| +};
|
| +xhr.onabort = function() {
|
| + debug('FAIL0: onabort');
|
| + finishJSTest();
|
| +};
|
| +xhr.ontimeout = function() {
|
| + deubg('FAIL0: ontimeout');
|
| + finishJSTest();
|
| +};
|
| +
|
| +xhr.onload = function() {
|
| + debug('xhr.onload');
|
| + debug(s[xhr.readyState] === ' ' ? 'DONE' : 'FAIL');
|
| + finishJSTest();
|
| +};
|
| +};
|
| +var s = 'I do not know why, but declaring this variable causes timeout.';
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|