mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
Implemented Houdini worklets.
This commit is contained in:
parent
abb2985ffe
commit
af8436c9be
34 changed files with 1209 additions and 17 deletions
|
@ -11185,6 +11185,21 @@
|
|||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/syntax_error.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/test_worklet.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/throw_exception.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"testharness": {
|
||||
|
@ -20027,6 +20042,12 @@
|
|||
"/_mozilla/mozilla/windowproxy.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/test_worklet.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/worklets/test_worklet.html",
|
||||
{}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -25796,7 +25817,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/interfaces.html": [
|
||||
"21e18bafdbfe5f3aa0ee71766bdc3b6a7e334226",
|
||||
"49dd9f6ef449813f2ce943d4c9fac351357e5c74",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/interfaces.js": [
|
||||
|
@ -31714,6 +31735,22 @@
|
|||
"mozilla/windowproxy.html": [
|
||||
"128cd0aa5cf80f60078979039036d32b470b0616",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/worklets/syntax_error.js": [
|
||||
"f3a9b8c78346507bc0b3190c8000ccf80cc133f6",
|
||||
"support"
|
||||
],
|
||||
"mozilla/worklets/test_worklet.html": [
|
||||
"fe9c93a5307c616f878b6623155e1b04c86dd994",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/worklets/test_worklet.js": [
|
||||
"9d5f8a07cd62a10f4f5ff93744672e5a6fdbc2b0",
|
||||
"support"
|
||||
],
|
||||
"mozilla/worklets/throw_exception.js": [
|
||||
"ebfdae19db68fed8e69142ef73842ac9921e4463",
|
||||
"support"
|
||||
]
|
||||
},
|
||||
"url_base": "/_mozilla/",
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[test_worklet.html]
|
||||
type: testharness
|
||||
prefs: [dom.worklet.testing.enabled:true]
|
|
@ -200,6 +200,7 @@ test_interfaces([
|
|||
"WebSocket",
|
||||
"Window",
|
||||
"Worker",
|
||||
"Worklet",
|
||||
"XMLDocument",
|
||||
"XMLHttpRequest",
|
||||
"XMLHttpRequestEventTarget",
|
||||
|
|
1
tests/wpt/mozilla/tests/mozilla/worklets/syntax_error.js
Normal file
1
tests/wpt/mozilla/tests/mozilla/worklets/syntax_error.js
Normal file
|
@ -0,0 +1 @@
|
|||
{];
|
35
tests/wpt/mozilla/tests/mozilla/worklets/test_worklet.html
Normal file
35
tests/wpt/mozilla/tests/mozilla/worklets/test_worklet.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test worklet loading</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script>
|
||||
var testWorklet = new TestWorklet();
|
||||
var host_info = get_host_info();
|
||||
|
||||
promise_test(function() {
|
||||
return testWorklet.addModule("test_worklet.js")
|
||||
.then(function () {
|
||||
assert_equals(testWorklet.lookup("hello"), "world");
|
||||
});
|
||||
}, "Loading a test worklet.");
|
||||
|
||||
promise_test(function(t) {
|
||||
var path = new URL("test_worklet.js", document.location).pathname;
|
||||
var url = new URL(path, host_info.HTTP_REMOTE_ORIGIN);
|
||||
return promise_rejects(t, "AbortError", testWorklet.addModule(url));
|
||||
}, "Loading a cross-origin test worklet.");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, "AbortError", testWorklet.addModule("nonexistent_worklet.js"));
|
||||
}, "Loading a nonexistent test worklet.");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, "AbortError", testWorklet.addModule("syntax_error.js"));
|
||||
}, "Loading a syntactically incorrect test worklet.");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, "AbortError", testWorklet.addModule("throw_exception.js"));
|
||||
}, "Loading an exception-throwing test worklet.");
|
||||
</script>
|
1
tests/wpt/mozilla/tests/mozilla/worklets/test_worklet.js
Normal file
1
tests/wpt/mozilla/tests/mozilla/worklets/test_worklet.js
Normal file
|
@ -0,0 +1 @@
|
|||
registerKeyValue("hello", "world");
|
|
@ -0,0 +1 @@
|
|||
throw new TypeError();
|
Loading…
Add table
Add a link
Reference in a new issue