Chromium Code Reviews| 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..745b3cf1ea839d494ec62a207dfe52b8b13aff02 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-failed-revalidation.html |
| @@ -0,0 +1,26 @@ |
| +<html> |
| +<head> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<script> |
| +async_test(function(t) { |
| + const url = 'resources/etag-200.php?' + Math.floor(100000000 * Math.random()); |
|
yhirano
2016/08/10 06:13:50
nit optional; If you want to wrap lines in 80 cols
hiroshige
2016/08/23 10:35:07
Done.
|
| + const xhr1 = new XMLHttpRequest(); |
| + xhr1.onload = function() { |
| + assert_equals(xhr1.status, 200); |
| + |
| + const xhr2 = new XMLHttpRequest(); |
| + xhr2.onload = function() { |
| + assert_equals(xhr2.status, 200); |
| + t.done(); |
| + }; |
| + xhr2.open("GET", url, true); |
| + xhr2.send(); |
| + }; |
| + |
| + xhr1.open("GET", url, true); |
| + xhr1.send(); |
| +}, "onload event must be invoked for failed revalidation when XHR's " + |
| + "onload handler initiates a new XHR to the same URL."); |
| +</script> |
| +</head> |