gecko-dev/testing/web-platform/tests/XMLHttpRequest/abort-during-unsent.htm

27 строки
785 B
HTML

<!doctype html>
<html>
<head>
<title>XMLHttpRequest: abort() during UNSENT</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4] following-sibling::ol/li[5]" />
</head>
<body>
<div id="log"></div>
<script>
var test = async_test()
test.step(function() {
var client = new XMLHttpRequest()
client.onreadystatechange = function() {
test.step(function() {
assert_unreached()
})
}
client.abort()
assert_equals(client.readyState, 0)
})
test.done()
</script>
</body>
</html>