Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html b/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a547510661bbd9dd8355661b6e62892ac0038d73 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-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 successful revalidation.'); |
| + |
| +window.jsTestIsAsync = true; |
| + |
| +var url = '../cache/resources/etag.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:08
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:08
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> |