Commit 044d3d63 authored by Adam Rice's avatar Adam Rice Committed by Commit Bot

Add a test to verify that sync XHR doesn't timeout

Blink had a bug that sync XHR would timeout after 10 seconds. Add a
regression test to make sure the issue does not reoccur.

BUG=844268

Change-Id: I161e133582b719102a02349828cd4d9a08773785
Reviewed-on: https://chromium-review.googlesource.com/1070089
Commit-Queue: Adam Rice <ricea@chromium.org>
Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561400}
parent c5ee3983
// META: global=sharedworker
// META: timeout=long
// This is a regression test for https://crbug.com/844268, when a timeout of 10
// seconds was applied to XHR in Chrome. There should be no timeout unless the
// "timeout" parameter is set on the object.
test(t => {
let xhr = new XMLHttpRequest();
// For practical reasons, we can't wait forever. 12 seconds is long enough to
// reliably reproduce the bug in Chrome.
xhr.open('GET', 'resources/trickle.py?ms=1000&count=12', false);
// The test will fail if this throws.
xhr.send();
}, 'Sync XHR should not have a timeout');
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment