Revision e803257f327d543467241723edd21215fbcb2fc3 authored by Tom Anderson on 30 March 2018, 19:57:10 UTC, committed by Chromium WPT Sync on 30 March 2018, 19:57:10 UTC
BUG=787020 TBR=dpranke,asvitkine Change-Id: I38740d1ee9fe621eabd5416f1a87b23a71fbb7e7 Reviewed-on: https://chromium-review.googlesource.com/986812 Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#547246}
1 parent 067f918
timeout-sync.htm
<!doctype html>
<html>
<head>
<title>XMLHttpRequest: timeout not allowed for sync requests</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://xhr.spec.whatwg.org/#the-timeout-attribute" data-tested-assertations="following::ol/li[1]" />
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[10]" />
</head>
<body>
<div id="log"></div>
<script>
test(function() {
var client = new XMLHttpRequest()
client.open('GET', 'folder.txt', false)
assert_throws("InvalidAccessError", function() { client.timeout = 1000 })
}, 'setting timeout attribute on sync request')
test(function() {
var client = new XMLHttpRequest()
client.timeout = 1000
assert_throws("InvalidAccessError", function() { client.open('GET', 'folder.txt', false) })
}, 'open() with async false when timeout is set')
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...