diff -r 000000000000 -r 6474c204b198 dom/bindings/parser/tests/test_constructor_no_interface_object.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dom/bindings/parser/tests/test_constructor_no_interface_object.py Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,36 @@ +def WebIDLTest(parser, harness): + threw = False + try: + parser.parse(""" + [Constructor, NoInterfaceObject] + interface TestConstructorNoInterfaceObject { + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + [NoInterfaceObject, Constructor] + interface TestConstructorNoInterfaceObject { + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + parser = parser.reset() + + parser.parse(""" + [NoInterfaceObject, NamedConstructor=FooBar] + interface TestNamedConstructorNoInterfaceObject { + }; + """)