Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: LayoutTests/http/tests/xmlhttprequest/xhr-onload.html

Issue 938553003: [DO NOT COMMIT] [DO NOT REVIEW] XHR timeout layout test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/xhr-onload-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/xhr-onload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698