michael@0: def WebIDLTest(parser, harness): michael@0: threw = False michael@0: try: michael@0: parser.parse(""" michael@0: interface DuplicateQualifiers1 { michael@0: getter getter byte foo(unsigned long index); 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: interface DuplicateQualifiers2 { michael@0: setter setter byte foo(unsigned long index, byte value); 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: interface DuplicateQualifiers3 { michael@0: creator creator byte foo(unsigned long index, byte value); 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: interface DuplicateQualifiers4 { michael@0: deleter deleter byte foo(unsigned long index); 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: interface DuplicateQualifiers5 { michael@0: getter deleter getter byte foo(unsigned long index); 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: results = parser.parse(""" michael@0: interface DuplicateQualifiers6 { michael@0: creator setter creator byte foo(unsigned long index, byte value); 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.")