diff options
Diffstat (limited to 'dom/bindings/parser/tests/test_constructor_no_interface_object.py')
-rw-r--r-- | dom/bindings/parser/tests/test_constructor_no_interface_object.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dom/bindings/parser/tests/test_constructor_no_interface_object.py b/dom/bindings/parser/tests/test_constructor_no_interface_object.py new file mode 100644 index 000000000..2b09ae71e --- /dev/null +++ b/dom/bindings/parser/tests/test_constructor_no_interface_object.py @@ -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 { + }; + """) |