4 def WebIDLTest(parser
, harness
):
7 [Global=Foo, Exposed=Foo]
9 getter any(DOMString name);
16 results
= parser
.finish()
19 results
[0].isOnGlobalProtoChain(),
20 "[Global] interface should be on global's proto chain",
23 results
[1].isOnGlobalProtoChain(),
24 "[Global] interface should be on global's proto chain",
27 parser
= parser
.reset()
32 [Global=Foo, Exposed=Foo]
34 getter any(DOMString name);
35 setter undefined(DOMString name, any arg);
40 except WebIDL
.WebIDLError
:
45 "Should have thrown for [Global] used on an interface with a " "named setter",
48 parser
= parser
.reset()
53 [Global=Foo, Exposed=Foo]
55 getter any(DOMString name);
56 deleter undefined(DOMString name);
61 except WebIDL
.WebIDLError
:
66 "Should have thrown for [Global] used on an interface with a " "named deleter",
69 parser
= parser
.reset()
74 [Global=Foo, LegacyOverrideBuiltIns, Exposed=Foo]
80 except WebIDL
.WebIDLError
:
85 "Should have thrown for [Global] used on an interface with a "
86 "[LegacyOverrideBuiltIns]",
89 parser
= parser
.reset()
94 [Global=Foo, Exposed=Foo]
97 [LegacyOverrideBuiltIns, Exposed=Foo]
103 except WebIDL
.WebIDLError
:
108 "Should have thrown for [Global] used on an interface with an "
109 "[LegacyOverrideBuiltIns] ancestor",
112 parser
= parser
.reset()
117 [Global=Foo, Exposed=Foo]
121 interface Bar : Foo {
126 except WebIDL
.WebIDLError
:
131 "Should have thrown for [Global] used on an interface with a " "descendant",
134 parser
= parser
.reset()
139 [Global, Exposed=Foo]
145 except WebIDL
.WebIDLError
:
150 "Should have thrown for [Global] without a right hand side value",