4 def WebIDLTest(parser
, harness
):
9 undefined foo(record<DOMString, Dict> arg);
14 results
= parser
.finish()
16 harness
.check(len(results
), 2, "Should know about two things")
18 isinstance(results
[1], WebIDL
.IDLInterface
), "Should have an interface here"
20 members
= results
[1].members
21 harness
.check(len(members
), 1, "Should have one member")
22 harness
.ok(members
[0].isMethod(), "Should have method")
23 signature
= members
[0].signatures()[0]
25 harness
.check(len(args
), 1, "Should have one arg")
26 harness
.ok(args
[0].type.isRecord(), "Should have a record type here")
27 harness
.ok(args
[0].type.inner
.isDictionary(), "Should have a dictionary inner type")
29 parser
= parser
.reset()
34 interface RecordUndefinedArg {
35 undefined foo(record<DOMString, undefined> arg);
40 results
= parser
.finish()
41 except WebIDL
.WebIDLError
:
44 threw
, "Should have thrown because record can't have undefined as value type."
47 parser
= parser
.reset()
53 record<DOMString, Dict> val;
58 results
= parser
.finish()
59 except WebIDL
.WebIDLError
:
61 harness
.ok(threw
, "Should have thrown on dictionary containing itself via record.")