4 def WebIDLTest(parser
, harness
):
10 const sequence<long> foo = [];
15 results
= parser
.finish()
16 except WebIDL
.WebIDLError
:
19 harness
.ok(threw
, "Constant cannot have [] as a default value")
21 parser
= parser
.reset()
26 undefined foo(optional sequence<long> arg = []);
30 results
= parser
.finish()
34 results
[0].members
[0].signatures()[0][1][0].defaultValue
,
35 WebIDL
.IDLEmptySequenceValue
,
37 "Should have IDLEmptySequenceValue as default value of argument",
40 parser
= parser
.reset()
45 sequence<long> foo = [];
49 results
= parser
.finish()
52 isinstance(results
[0].members
[0].defaultValue
, WebIDL
.IDLEmptySequenceValue
),
53 "Should have IDLEmptySequenceValue as default value of " "dictionary member",