mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Auto merge of #23500 - sreeise:exposed_binding_gen, r=jdm
Make bindings aware of exposed members/partial interfaces <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23332 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23500) <!-- Reviewable:end -->
This commit is contained in:
commit
95b304b786
25 changed files with 151 additions and 78 deletions
|
@ -9735,6 +9735,9 @@
|
|||
"mozilla/webgl/tex_image_2d_simple_ref.html": [
|
||||
[]
|
||||
],
|
||||
"mozilla/worker_member_test.js": [
|
||||
[]
|
||||
],
|
||||
"mozilla/worklets/syntax_error.js": [
|
||||
[]
|
||||
],
|
||||
|
@ -18895,7 +18898,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/interface_member_exposed.html": [
|
||||
"dd637cf92a894e4569e8fb0baf11eea6968033af",
|
||||
"f408f9c3dae4b78b49bf77b5ad32c0d5ee406f7e",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/interfaces.html": [
|
||||
|
@ -19594,6 +19597,10 @@
|
|||
"d5c75899eb546d7243d65b6f55e876c5008c6292",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/worker_member_test.js": [
|
||||
"abca5cd280ac07914cb21ee4968ac4d27e7feb68",
|
||||
"support"
|
||||
],
|
||||
"mozilla/worklets/syntax_error.js": [
|
||||
"4adade8939ce62eb5e83d73d4faf2261b264d809",
|
||||
"support"
|
||||
|
|
|
@ -43,4 +43,22 @@ for (var i = 0; i < staticMembers.length; i++) {
|
|||
test_member(name + 'Enabled', true, function(o) { return o; });
|
||||
test_member(name + 'Disabled', false, function(o) { return o; });
|
||||
}
|
||||
|
||||
members = [
|
||||
'semiExposedBoolFromInterface',
|
||||
'boolFromSemiExposedPartialInterface',
|
||||
'semiExposedBoolFromPartialInterface',
|
||||
];
|
||||
for (const member of members) {
|
||||
var interface = new TestBinding();
|
||||
async_test(function(t) {
|
||||
assert_true(member in interface);
|
||||
assert_true(interface[member]);
|
||||
let w = new Worker("worker_member_test.js?" + member);
|
||||
w.onmessage = t.step_func(function(e) {
|
||||
assert_equals(e.data, undefined);
|
||||
t.done();
|
||||
});
|
||||
}, member);
|
||||
}
|
||||
</script>
|
||||
|
|
3
tests/wpt/mozilla/tests/mozilla/worker_member_test.js
Normal file
3
tests/wpt/mozilla/tests/mozilla/worker_member_test.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
let member = location.search.slice(1);
|
||||
var binding = new TestBinding();
|
||||
postMessage(binding[member]);
|
Loading…
Add table
Add a link
Reference in a new issue