mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 95aad3bd9b82b5c65d84d53517b65ba084de9394
This commit is contained in:
parent
5942e9e3cb
commit
e8ed816728
145 changed files with 2024 additions and 578 deletions
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>XMLHttpRequest: open() call fires sync readystate event</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[13]/ol[1]/li[2]" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var client = new XMLHttpRequest()
|
||||
var eventsFired = []
|
||||
client.onreadystatechange = function(){
|
||||
eventsFired.push(client.readyState)
|
||||
}
|
||||
client.open('GET', "...", false)
|
||||
assert_array_equals(eventsFired, [1])
|
||||
}, document.title + ' (sync)')
|
||||
test(function() {
|
||||
var client = new XMLHttpRequest()
|
||||
var eventsFired = []
|
||||
client.onreadystatechange = function(){
|
||||
eventsFired.push(client.readyState)
|
||||
}
|
||||
client.open('GET', "...", true)
|
||||
assert_array_equals(eventsFired, [1])
|
||||
}, document.title + ' (async)')
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue