michael@0: def WebIDLTest(parser, harness): michael@0: threw = False michael@0: try: michael@0: parser.parse(""" michael@0: [Constructor, NoInterfaceObject] michael@0: interface TestConstructorNoInterfaceObject { michael@0: }; michael@0: """) michael@0: michael@0: results = parser.finish() michael@0: except: michael@0: threw = True michael@0: michael@0: harness.ok(threw, "Should have thrown.") michael@0: michael@0: threw = False michael@0: try: michael@0: parser.parse(""" michael@0: [NoInterfaceObject, Constructor] michael@0: interface TestConstructorNoInterfaceObject { michael@0: }; michael@0: """) michael@0: michael@0: results = parser.finish() michael@0: except: michael@0: threw = True michael@0: michael@0: harness.ok(threw, "Should have thrown.") michael@0: michael@0: parser = parser.reset() michael@0: michael@0: parser.parse(""" michael@0: [NoInterfaceObject, NamedConstructor=FooBar] michael@0: interface TestNamedConstructorNoInterfaceObject { michael@0: }; michael@0: """)