Update web-platform-tests to revision 097043b336e46876e281ddec3bb014fe9c480128

This commit is contained in:
WPT Sync Bot 2019-08-03 10:25:42 +00:00
parent ecd32570c0
commit b68253eac0
405 changed files with 9164 additions and 3050 deletions

View file

@ -1,15 +1,4 @@
<!--
try {
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
this.close()
postMessage([true, this.readyState])
}
} catch(e) {
postMessage([false, String(e)])
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>dedicated worker - EventSource: close()</title>
@ -21,7 +10,7 @@ try {
<script>
var test = async_test();
test.step(function() {
var worker = new Worker('#')
var worker = new Worker('eventsource-close.js')
worker.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -32,5 +21,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,9 @@
try {
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
this.close()
postMessage([true, this.readyState])
}
} catch(e) {
postMessage([false, String(e)])
}

View file

@ -1,9 +1,4 @@
<!--
self.close()
var source = new EventSource("../resources/message.py")
postMessage(source.readyState)
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>dedicated worker - EventSource created after: worker.close()</title>
@ -15,7 +10,7 @@ postMessage(source.readyState)
<script>
var test = async_test();
test.step(function() {
var worker = new Worker('#')
var worker = new Worker('eventsource-close2.js')
worker.onmessage = function(e) {
test.step(function() {
assert_equals(e.data, EventSource.CONNECTING, 'this.readyState')
@ -25,5 +20,4 @@ postMessage(source.readyState)
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,3 @@
self.close()
var source = new EventSource("../resources/message.py")
postMessage(source.readyState)

View file

@ -1,15 +1,3 @@
<!--
try {
var url = decodeURIComponent(location.hash.substr(1))
var source = new EventSource(url)
source.onerror = function(e) {
postMessage([true, this.readyState, 'data' in e])
this.close();
}
} catch(e) {
postMessage([false, String(e)])
}
/*-->
<!DOCTYPE html>
<html>
<head>
@ -24,7 +12,7 @@ try {
function fetchFail(url) {
var test = async_test(document.title + " (" + url + ")")
test.step(function() {
var worker = new Worker('#'+encodeURIComponent(url))
var worker = new Worker('eventsource-constructor-non-same-origin.js#'+encodeURIComponent(url))
worker.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -44,4 +32,3 @@ try {
event is dispatched and not a MessageEvent -->
</body>
</html>
<!--*/ //-->

View file

@ -0,0 +1,10 @@
try {
var url = decodeURIComponent(location.hash.substr(1))
var source = new EventSource(url)
source.onerror = function(e) {
postMessage([true, this.readyState, 'data' in e])
this.close();
}
} catch(e) {
postMessage([false, String(e)])
}

View file

@ -0,0 +1,7 @@
try {
var source = new EventSource("http://this is invalid/")
postMessage([false, 'no exception thrown'])
source.close()
} catch(e) {
postMessage([true, e.code])
}

View file

@ -0,0 +1,9 @@
try {
var source = new EventSource("../resources/message.py")
source.onmessage = function(e) {
postMessage([true, e.data])
this.close()
}
} catch(e) {
postMessage([false, String(e)])
}

View file

@ -1,15 +1,4 @@
<!--
try {
var source = new EventSource("../resources/message.py")
source.onmessage = function(e) {
postMessage([true, e.data])
this.close()
}
} catch(e) {
postMessage([false, String(e)])
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>dedicated worker - EventSource: onmessage</title>
@ -21,7 +10,7 @@ try {
<script>
var test = async_test()
test.step(function() {
var worker = new Worker('#')
var worker = new Worker('eventsource-onmesage.js')
worker.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -32,5 +21,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -1,15 +1,4 @@
<!--
try {
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
postMessage([true, source.readyState, 'data' in e, e.bubbles, e.cancelable])
this.close()
}
} catch(e) {
postMessage([false, String(e)])
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>dedicated worker - EventSource: onopen (announcing the connection)</title>
@ -21,7 +10,7 @@ try {
<script>
var test = async_test()
test.step(function() {
var worker = new Worker('#')
var worker = new Worker('eventsource-onopen.js')
worker.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -35,5 +24,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,9 @@
try {
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
postMessage([true, source.readyState, 'data' in e, e.bubbles, e.cancelable])
this.close()
}
} catch(e) {
postMessage([false, String(e)])
}

View file

@ -1,14 +1,4 @@
<!--
try {
EventSource.prototype.ReturnTrue = function() { return true }
var source = new EventSource("../resources/message.py")
postMessage([true, source.ReturnTrue(), 'EventSource' in self])
source.close()
} catch(e) {
postMessage([false, String(e)])
}
/*-->
<!DoCtYpE hTMl>
<!doctype html>
<html>
<heAd>
<title>dedicated worker - EventSource: prototype et al</tiTle>
@ -20,7 +10,7 @@ try {
<sCript>
var test = async_test();
test.step(function() {
var worker = new Worker('#')
var worker = new Worker('eventsource-prototype.js')
worker.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -32,5 +22,4 @@ try {
})
</scrIpt>
</bOdy>
</htMl>
<!--*/ //-->
</htMl>

View file

@ -0,0 +1,8 @@
try {
EventSource.prototype.ReturnTrue = function() { return true }
var source = new EventSource("../resources/message.py")
postMessage([true, source.ReturnTrue(), 'EventSource' in self])
source.close()
} catch(e) {
postMessage([false, String(e)])
}

View file

@ -1,13 +1,4 @@
<!--
try {
var source = new EventSource("../resources/message.py")
postMessage([true, source.url])
source.close()
} catch(e) {
postMessage([false, String(e)])
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>dedicated worker - EventSource: url</title>
@ -20,7 +11,7 @@ try {
var test = async_test();
test.step(function() {
var url = "resources/message.py"
var worker = new Worker('#')
var worker = new Worker('eventsource-url.js')
worker.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1]);
@ -31,5 +22,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,7 @@
try {
var source = new EventSource("../resources/message.py")
postMessage([true, source.url])
source.close()
} catch(e) {
postMessage([false, String(e)])
}

View file

@ -1,18 +1,4 @@
<!--
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
this.close()
port.postMessage([true, this.readyState])
}
} catch(e) {
port.postMessage([false, String(e)])
}
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>shared worker - EventSource: close()</title>
@ -24,7 +10,7 @@ try {
<script>
var test = async_test();
test.step(function() {
var worker = new SharedWorker('#')
var worker = new SharedWorker('eventsource-close.js')
worker.port.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -35,5 +21,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,12 @@
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
this.close()
port.postMessage([true, this.readyState])
}
} catch(e) {
port.postMessage([false, String(e)])
}
}

View file

@ -1,18 +1,3 @@
<!--
onconnect = function(e) {
try {
var port = e.ports[0]
var url = decodeURIComponent(location.hash.substr(1))
var source = new EventSource(url)
source.onerror = function(e) {
port.postMessage([true, this.readyState, 'data' in e])
this.close();
}
} catch(e) {
port.postMessage([false, String(e)])
}
}
/*-->
<!DOCTYPE html>
<html>
<head>
@ -27,7 +12,7 @@ try {
function fetchFail(url) {
var test = async_test(document.title + " (" + url + ")")
test.step(function() {
var worker = new SharedWorker('#'+encodeURIComponent(url))
var worker = new SharedWorker('eventsource-constructor-non-same-origin.js#'+encodeURIComponent(url))
worker.port.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -47,4 +32,3 @@ try {
event is dispatched and not a MessageEvent -->
</body>
</html>
<!--*/ //-->

View file

@ -0,0 +1,13 @@
onconnect = function(e) {
try {
var port = e.ports[0]
var url = decodeURIComponent(location.hash.substr(1))
var source = new EventSource(url)
source.onerror = function(e) {
port.postMessage([true, this.readyState, 'data' in e])
this.close();
}
} catch(e) {
port.postMessage([false, String(e)])
}
}

View file

@ -0,0 +1,10 @@
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("http://this is invalid/")
port.postMessage([false, 'no exception thrown'])
source.close()
} catch(e) {
port.postMessage([true, e.code])
}
}

View file

@ -1,19 +1,4 @@
<!--
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.addEventListener("message", listener, false)
function listener(e) {
port.postMessage([true, e.data])
this.close()
}
} catch(e) {
port.postMessage([false, String(e)])
}
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>shared worker - EventSource: addEventListener()</title>
@ -25,7 +10,7 @@ try {
<script>
var test = async_test()
test.step(function() {
var worker = new SharedWorker('#')
var worker = new SharedWorker('eventsource-eventtarget.js')
worker.port.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -36,5 +21,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,13 @@
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.addEventListener("message", listener, false)
function listener(e) {
port.postMessage([true, e.data])
this.close()
}
} catch(e) {
port.postMessage([false, String(e)])
}
}

View file

@ -0,0 +1,12 @@
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.onmessage = function(e) {
port.postMessage([true, e.data])
this.close()
}
} catch(e) {
port.postMessage([false, String(e)])
}
}

View file

@ -1,18 +1,4 @@
<!--
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.onmessage = function(e) {
port.postMessage([true, e.data])
this.close()
}
} catch(e) {
port.postMessage([false, String(e)])
}
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>shared worker - EventSource: onmessage</title>
@ -24,7 +10,7 @@ try {
<script>
var test = async_test()
test.step(function() {
var worker = new SharedWorker('#')
var worker = new SharedWorker('eventsource-onmesage.js')
worker.port.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -35,5 +21,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -1,18 +1,4 @@
<!--
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
port.postMessage([true, source.readyState, 'data' in e, e.bubbles, e.cancelable])
this.close()
}
} catch(e) {
port.postMessage([false, String(e)])
}
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>shared worker - EventSource: onopen (announcing the connection)</title>
@ -24,7 +10,7 @@ try {
<script>
var test = async_test()
test.step(function() {
var worker = new SharedWorker('#')
var worker = new SharedWorker('eventsource-onopen.js')
worker.port.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -38,5 +24,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,12 @@
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.onopen = function(e) {
port.postMessage([true, source.readyState, 'data' in e, e.bubbles, e.cancelable])
this.close()
}
} catch(e) {
port.postMessage([false, String(e)])
}
}

View file

@ -1,17 +1,4 @@
<!--
onconnect = function(e) {
try {
var port = e.ports[0]
EventSource.prototype.ReturnTrue = function() { return true }
var source = new EventSource("../resources/message.py")
port.postMessage([true, source.ReturnTrue(), 'EventSource' in self])
source.close()
} catch(e) {
port.postMessage([false, String(e)])
}
}
/*-->
<!DoCtYpE hTMl>
<!doctype html>
<html>
<heAd>
<title>shared worker - EventSource: prototype et al</tiTle>
@ -23,7 +10,7 @@ try {
<sCript>
var test = async_test();
test.step(function() {
var worker = new SharedWorker('#')
var worker = new SharedWorker('eventsource-prototype.js')
worker.port.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1])
@ -35,5 +22,4 @@ try {
})
</scrIpt>
</bOdy>
</htMl>
<!--*/ //-->
</htMl>

View file

@ -0,0 +1,11 @@
onconnect = function(e) {
try {
var port = e.ports[0]
EventSource.prototype.ReturnTrue = function() { return true }
var source = new EventSource("../resources/message.py")
port.postMessage([true, source.ReturnTrue(), 'EventSource' in self])
source.close()
} catch(e) {
port.postMessage([false, String(e)])
}
}

View file

@ -1,16 +1,4 @@
<!--
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
port.postMessage([true, source.url])
source.close()
} catch(e) {
port.postMessage([false, String(e)])
}
}
/*-->
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>shared worker - EventSource: url</title>
@ -23,7 +11,7 @@ try {
var test = async_test();
test.step(function() {
var url = "resources/message.py"
var worker = new SharedWorker('#')
var worker = new SharedWorker('eventsource-url.js')
worker.port.onmessage = function(e) {
test.step(function() {
assert_true(e.data[0], e.data[1]);
@ -34,5 +22,4 @@ try {
})
</script>
</body>
</html>
<!--*/ //-->
</html>

View file

@ -0,0 +1,10 @@
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
port.postMessage([true, source.url])
source.close()
} catch(e) {
port.postMessage([false, String(e)])
}
}