Index: third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-failed-revalidation.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-failed-revalidation.html b/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-failed-revalidation.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b54c51c816248ff8816ea389257b1c93c2a351d9 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-failed-revalidation.html |
@@ -0,0 +1,32 @@ |
+<html> |
+<head> |
+<script src="/js-test-resources/js-test.js"></script> |
+</head> |
+<body> |
+<script> |
+description('onload event must be invoked for failed revalidation.'); |
+ |
+window.jsTestIsAsync = true; |
+ |
+var url = '../cache/resources/etag-200.php?' + Math.floor(100000000 * Math.random()); |
yhirano
2016/08/09 09:35:58
const
hiroshige
2016/08/10 06:03:08
Done.
|
+ |
+xhr1 = new XMLHttpRequest(); |
yhirano
2016/08/09 09:35:58
const
hiroshige
2016/08/10 06:03:07
Done.
|
+xhr1.onload = function() { |
+ debug('onload for the 1st request'); |
+ shouldBeEqualToNumber("xhr1.status", 200); |
yhirano
2016/08/09 09:35:58
indent
hiroshige
2016/08/10 06:03:07
Done.
|
+ |
+ xhr2 = new XMLHttpRequest(); |
yhirano
2016/08/09 09:35:58
const
hiroshige
2016/08/10 06:03:08
Done.
|
+ xhr2.onload = function() { |
+ debug('onload for the 2nd request'); |
+ shouldBeEqualToNumber("xhr2.status", 200); |
+ finishJSTest(); |
+ }; |
+ xhr2.open("GET", url, true); |
+ xhr2.send(); |
+}; |
+ |
+xhr1.open("GET", url, true); |
+xhr1.send(); |
+</script> |
+</body> |
+</html> |