| Index: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/async-xhr-revalidate-after-sync-xhr.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/async-xhr-revalidate-after-sync-xhr.html b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/async-xhr-revalidate-after-sync-xhr.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4c57985b211a871845cc91b34d5dc936737b5bd0
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/async-xhr-revalidate-after-sync-xhr.html
|
| @@ -0,0 +1,27 @@
|
| +<html>
|
| +<body>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +<script>
|
| +description('Async XHR should not turn sync due to revalidation.');
|
| +window.jsTestIsAsync = true;
|
| +const url = '/cache/resources/etag-200.php?' +
|
| + Math.floor(100000000 * Math.random());
|
| +
|
| +xhr1 = new XMLHttpRequest();
|
| +xhr2SendIsReturned = false;
|
| +xhr1.open('GET', url, false);
|
| +xhr1.onload = setTimeout(function() {
|
| + xhr2 = new XMLHttpRequest();
|
| + xhr2.open('GET', url, true);
|
| + xhr2.onload = function() {
|
| + shouldBeTrue("xhr2SendIsReturned");
|
| + shouldNotBe("xhr1.responseText", "xhr2.responseText");
|
| + finishJSTest();
|
| + };
|
| + xhr2.send();
|
| + xhr2SendIsReturned = true;
|
| +}, 0);
|
| +xhr1.send();
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|