| <html> |
| <head> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script> |
| async_test(function(t) { |
| const url = 'resources/etag.php?' + Math.floor(100000000 * Math.random()); |
| 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 successful revalidation when XHR's " + |
| "onload handler initiates a new XHR to the same URL."); |
| </script> |
| </head> |