diff -r 000000000000 -r 6474c204b198 dom/bindings/parser/tests/test_interface_identifier_conflicts_across_members.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dom/bindings/parser/tests/test_interface_identifier_conflicts_across_members.py Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,60 @@ +def WebIDLTest(parser, harness): + threw = False + try: + parser.parse(""" + interface IdentifierConflictAcrossMembers1 { + const byte thing1 = 1; + readonly attribute long thing1; + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface IdentifierConflictAcrossMembers2 { + readonly attribute long thing1; + const byte thing1 = 1; + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface IdentifierConflictAcrossMembers3 { + getter boolean thing1(DOMString name); + readonly attribute long thing1; + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface IdentifierConflictAcrossMembers1 { + const byte thing1 = 1; + long thing1(); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.")