Update web-platform-tests to revision 95aad3bd9b82b5c65d84d53517b65ba084de9394

This commit is contained in:
Ms2ger 2016-02-11 17:10:01 +01:00
parent 5942e9e3cb
commit e8ed816728
145 changed files with 2024 additions and 578 deletions

View file

@ -0,0 +1,13 @@
@ecoal95
@hallvors
@kangxu
@caitp
@Manishearth
@plehegar
@foolip
@jungkees
@ibelem
@mathiasbynens
@ronkorving
@jdm
@Ms2ger

View file

@ -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>

View file

@ -4,7 +4,7 @@
<title>XMLHttpRequest: open() sync request not allowed if responseType is set</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[4]" />
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[10]" />
</head>
<body>
@ -15,6 +15,9 @@
function request(type) {
test(function() {
var client = new XMLHttpRequest()
client.onreadystatechange = this.step_func(function(){
assert_unreached('No events should fire here')
})
client.responseType = type
assert_throws("InvalidAccessError", function() { client.open('GET', "...", false) })
}, document.title + " (" + type + ")")

View file

@ -43,7 +43,7 @@
}
test(function() {
assert_true((new Date(client.getResponseHeader('Last-Modified'))).getTime() == (new Date(client.responseXML.lastModified)).getTime(), 'responseXML.lastModified time shoud be equal to time in response Last-Modified header')
assert_true((new Date(client.getResponseHeader('Last-Modified'))).getTime() == (new Date(client.responseXML.lastModified)).getTime(), 'responseXML.lastModified time should be equal to time in response Last-Modified header')
}, 'lastModified set according to HTTP header')
test(function() {