mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 4d96cccabc2feacd48e1dab9afc22b8af2225572
This commit is contained in:
parent
0d236288cc
commit
c66c6af0ba
1067 changed files with 63768 additions and 10900 deletions
|
@ -0,0 +1,14 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Base URL in workers: importScripts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker("../beta/importScripts.py");
|
||||
worker.onmessage = this.step_func_done(function(e) {
|
||||
assert_equals(e.data, "gamma");
|
||||
});
|
||||
worker.onerror = this.unreached_func("Got error event");
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,14 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Base URL in workers: new SharedWorker()</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker("../beta/sharedworker.py");
|
||||
worker.onmessage = this.step_func_done(function(e) {
|
||||
assert_equals(e.data, "gamma");
|
||||
});
|
||||
worker.onerror = this.unreached_func("Got error event");
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,14 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Base URL in workers: new Worker()</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker("../beta/worker.py");
|
||||
worker.onmessage = this.step_func_done(function(e) {
|
||||
assert_equals(e.data, "gamma");
|
||||
});
|
||||
worker.onerror = this.unreached_func("Got error event");
|
||||
});
|
||||
</script>
|
14
tests/wpt/web-platform-tests/workers/baseurl/alpha/xhr.html
Normal file
14
tests/wpt/web-platform-tests/workers/baseurl/alpha/xhr.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Base URL in workers: XHR</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker("../beta/xhr.py");
|
||||
worker.onmessage = this.step_func_done(function(e) {
|
||||
assert_equals(e.data, "gamma\n");
|
||||
});
|
||||
worker.onerror = this.unreached_func("Got error event");
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,3 @@
|
|||
def main(request, response):
|
||||
return (302, "Moved"), [("Location", "../gamma/importScripts.js")], "postMessage('executed redirecting script');"
|
||||
|
|
@ -0,0 +1 @@
|
|||
postMessage('beta');
|
|
@ -0,0 +1,3 @@
|
|||
def main(request, response):
|
||||
return (302, "Moved"), [("Location", "../gamma/sharedworker.js")], "postMessage('executed redirecting script');"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
onconnect = function(e) {
|
||||
e.source.postMessage('beta');
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
postMessage("beta");
|
|
@ -0,0 +1 @@
|
|||
beta
|
|
@ -0,0 +1,3 @@
|
|||
def main(request, response):
|
||||
return (302, "Moved"), [("Location", "../gamma/worker.js")], "postMessage('executed redirecting script');"
|
||||
|
3
tests/wpt/web-platform-tests/workers/baseurl/beta/xhr.py
Normal file
3
tests/wpt/web-platform-tests/workers/baseurl/beta/xhr.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
def main(request, response):
|
||||
return (302, "Moved"), [("Location", "../gamma/xhr.js")], "postMessage('executed redirecting script');"
|
||||
|
|
@ -0,0 +1 @@
|
|||
importScripts("script.js");
|
|
@ -0,0 +1 @@
|
|||
postMessage('gamma');
|
|
@ -0,0 +1,4 @@
|
|||
var worker = new SharedWorker("subsharedworker.js");
|
||||
worker.port.onmessage = function(e) {
|
||||
postMessage(e.data);
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
onconnect = function(e) {
|
||||
e.source.postMessage('gamma');
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
postMessage("gamma");
|
|
@ -0,0 +1 @@
|
|||
gamma
|
|
@ -0,0 +1,4 @@
|
|||
var worker = new Worker("subworker.js");
|
||||
worker.onmessage = function(e) {
|
||||
postMessage(e.data);
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
var x = new XMLHttpRequest();
|
||||
x.open("GET", "test.txt", false);
|
||||
x.send();
|
||||
postMessage(x.response);
|
Loading…
Add table
Add a link
Reference in a new issue