4 def WebIDLTest(parser
, harness
):
9 [Global=TestConstructorGlobal, Exposed=TestConstructorGlobal]
10 interface TestConstructorGlobal {
17 except WebIDL
.WebIDLError
:
20 harness
.ok(threw
, "Should have thrown.")
22 parser
= parser
.reset()
27 [Global=TestLegacyFactoryFunctionGlobal, Exposed=TestLegacyFactoryFunctionGlobal,
28 LegacyFactoryFunction=FooBar]
29 interface TestLegacyFactoryFunctionGlobal {
34 except WebIDL
.WebIDLError
:
37 harness
.ok(threw
, "Should have thrown.")
39 parser
= parser
.reset()
44 [LegacyFactoryFunction=FooBar, Global=TestLegacyFactoryFunctionGlobal,
45 Exposed=TestLegacyFactoryFunctionGlobal]
46 interface TestLegacyFactoryFunctionGlobal {
51 except WebIDL
.WebIDLError
:
54 harness
.ok(threw
, "Should have thrown.")
56 parser
= parser
.reset()
61 [Global=TestHTMLConstructorGlobal, Exposed=TestHTMLConstructorGlobal]
62 interface TestHTMLConstructorGlobal {
63 [HTMLConstructor] constructor();
69 except WebIDL
.WebIDLError
:
72 harness
.ok(threw
, "Should have thrown.")