diff options
Diffstat (limited to 'dom/bindings/parser/tests/test_special_methods_uniqueness.py')
-rw-r--r-- | dom/bindings/parser/tests/test_special_methods_uniqueness.py | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/dom/bindings/parser/tests/test_special_methods_uniqueness.py b/dom/bindings/parser/tests/test_special_methods_uniqueness.py new file mode 100644 index 000000000..42e2c5bb7 --- /dev/null +++ b/dom/bindings/parser/tests/test_special_methods_uniqueness.py @@ -0,0 +1,62 @@ +import WebIDL + +def WebIDLTest(parser, harness): + threw = False + try: + parser.parse(""" + interface SpecialMethodUniqueness1 { + getter deleter boolean (DOMString name); + getter boolean (DOMString name); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface SpecialMethodUniqueness1 { + deleter boolean (DOMString name); + getter deleter boolean (DOMString name); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface SpecialMethodUniqueness1 { + setter creator boolean (DOMString name); + creator boolean (DOMString name); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface SpecialMethodUniqueness1 { + setter boolean (DOMString name); + creator setter boolean (DOMString name); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") |