mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
Root sequence<{any,object}> IDL arguments using CustomAutoRooter
Also pulls in mozjs 0.1.10 to support the change.
This commit is contained in:
parent
dfd8e85338
commit
a01d1eabef
8 changed files with 91 additions and 10 deletions
|
@ -32845,6 +32845,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/custom_auto_rooter.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/custom_auto_rooter.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/deep_serialization_succeeds.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/deep_serialization_succeeds.html",
|
||||
|
@ -66036,6 +66042,10 @@
|
|||
"67d8cdd3e3a1656ba315fcbf6dae7236680bac16",
|
||||
"reftest"
|
||||
],
|
||||
"mozilla/custom_auto_rooter.html": [
|
||||
"3466095fb0846b848c948dd1596764fff456fa9b",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/deep_serialization_succeeds.html": [
|
||||
"cb3d201d577c17d19babf1f6c04ba882fa42048e",
|
||||
"testharness"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[custom_auto_rooter.html]
|
||||
type: testharness
|
||||
prefs: [dom.testbinding.enabled:true]
|
23
tests/wpt/mozilla/tests/mozilla/custom_auto_rooter.html
Normal file
23
tests/wpt/mozilla/tests/mozilla/custom_auto_rooter.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>Types using Custom Auto Rooter work correctly</title>
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<script>
|
||||
test(function() {
|
||||
var t = new TestBinding;
|
||||
|
||||
var seq = [5, "str", { key: "val" }, undefined];
|
||||
assert_array_equals(seq, t.anySequencePassthrough(seq), "Returned simple array is the same");
|
||||
|
||||
var seq = new Array(null, {'inner': 1, 'a': 'as'}, {'inner': 2}, null, undefined);
|
||||
assert_array_equals(seq, t.anySequencePassthrough(seq), "Returned array using new Array is the same");
|
||||
|
||||
var seq = new Array(null, {'inner': 1, 'a': 'as', 'toString': function() { seq = null; return Object.prototype.toString(this); }}, {'inner': 2}, null, undefined);
|
||||
assert_array_equals(seq, t.anySequencePassthrough(seq), "Returned array with closure member is the same");
|
||||
}, "sequence<any> conversion did not lose any values");
|
||||
</script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue