michael@0: def WebIDLTest(parser, harness): michael@0: threw = False michael@0: try: michael@0: parser.parse(""" michael@0: interface OneNullableInUnion { michael@0: void foo((object? or DOMString?) arg); 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, michael@0: "Two nullable member types of a union should have thrown.") michael@0: michael@0: parser.reset() michael@0: threw = False michael@0: michael@0: try: michael@0: parser.parse(""" michael@0: interface NullableInNullableUnion { michael@0: void foo((object? or DOMString)? arg); 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, michael@0: "A nullable union type with a nullable member type should have " michael@0: "thrown.") michael@0: michael@0: parser.reset() michael@0: threw = False michael@0: michael@0: try: michael@0: parser.parse(""" michael@0: interface NullableInUnionNullableUnionHelper { michael@0: }; michael@0: interface NullableInUnionNullableUnion { michael@0: void foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg); 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, michael@0: "A nullable union type with a nullable member type should have " michael@0: "thrown.")