Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-origin-preflight-timeout.html

Issue 2755483006: Stop having separate timeout timers for the preflight and the actual request (Closed)
Patch Set: fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-allow-with-delay.php » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-origin-preflight-timeout.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-origin-preflight-timeout.html b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-origin-preflight-timeout.html
new file mode 100644
index 0000000000000000000000000000000000000000..923ea56e2680677b004abf3305c5930274ed4496
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-origin-preflight-timeout.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+async_test(t => {
+ const url = 'http://localhost:8000/xmlhttprequest/resources/access-control-allow-with-delay.php';
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', url);
+ xhr.setRequestHeader('foo', 'bar');
+ xhr.timeout = 1500;
+ xhr.ontimeout = t.step_func_done(() => {
+ assert_equals(xhr.readyState, 4);
+ });
+ xhr.onload = t.unreached_func('load event fired');
+ xhr.send();
+ }, 'CORS preflight and the actual request should use the same timer');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-allow-with-delay.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698