mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision 7f2f85a88f434798e9d643427b34b05fab8278c6
This commit is contained in:
parent
6b1a08c051
commit
73bc5cf1b8
180 changed files with 5807 additions and 169 deletions
|
@ -1,26 +0,0 @@
|
|||
<!--
|
||||
try {
|
||||
importScripts();
|
||||
postMessage(true);
|
||||
} catch(ex) {
|
||||
postMessage(String(ex));
|
||||
}
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts no arguments</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_true(e.data);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
|
@ -0,0 +1,7 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
|
||||
test(function() {
|
||||
importScripts();
|
||||
});
|
||||
|
||||
done();
|
|
@ -1,32 +0,0 @@
|
|||
<!--
|
||||
var ran = false;
|
||||
var threw = false;
|
||||
var code = undefined;
|
||||
try {
|
||||
importScripts('data:text/javascript,ran=true','http://foo bar');
|
||||
} catch(e) {
|
||||
threw = true;
|
||||
code = e.code;
|
||||
}
|
||||
postMessage([ran, threw, code]);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts resolving urls</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_false(e.data[0], 'first argument to importScripts ran');
|
||||
assert_true(e.data[1], 'space in URL in second argument to importScripts did not throw');
|
||||
assert_equals(e.data[2], 12, 'exception code');
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
|
@ -0,0 +1,11 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
|
||||
test(function() {
|
||||
var ran = false;
|
||||
assert_throws("SyntaxError", function() {
|
||||
importScripts('data:text/javascript,ran=true','http://foo bar');
|
||||
});
|
||||
assert_false(ran, 'first argument to importScripts ran');
|
||||
});
|
||||
|
||||
done();
|
Loading…
Add table
Add a link
Reference in a new issue