From d3528ffce4092e0b28b9494f96555368bf8945b9 Mon Sep 17 00:00:00 2001 From: AgostonSzepessy Date: Sun, 6 Mar 2016 18:47:35 -0500 Subject: components/script/dom/bindings/codegen/parser/update.sh now downloads all the latest *.py tests from https://hg.mozilla.org/mozilla-central/archive/tip.tar.gz/dom/bindings/parser/tests/ --- .../parser/tests/test_callback_interface.py | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py') diff --git a/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py index 80896ca1edb..e4789dae168 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py @@ -45,3 +45,50 @@ def WebIDLTest(parser, harness): harness.ok(threw, "Should not allow callback parent of non-callback interface") + parser = parser.reset() + parser.parse(""" + callback interface TestCallbackInterface1 { + void foo(); + }; + callback interface TestCallbackInterface2 { + void foo(DOMString arg); + void foo(TestCallbackInterface1 arg); + }; + callback interface TestCallbackInterface3 { + void foo(DOMString arg); + void foo(TestCallbackInterface1 arg); + static void bar(); + }; + callback interface TestCallbackInterface4 { + void foo(DOMString arg); + void foo(TestCallbackInterface1 arg); + static void bar(); + const long baz = 5; + }; + callback interface TestCallbackInterface5 { + static attribute boolean bool; + void foo(); + }; + callback interface TestCallbackInterface6 { + void foo(DOMString arg); + void foo(TestCallbackInterface1 arg); + void bar(); + }; + callback interface TestCallbackInterface7 { + static attribute boolean bool; + }; + callback interface TestCallbackInterface8 { + attribute boolean bool; + }; + callback interface TestCallbackInterface9 : TestCallbackInterface1 { + void foo(); + }; + callback interface TestCallbackInterface10 : TestCallbackInterface1 { + void bar(); + }; + """) + results = parser.finish() + for (i, iface) in enumerate(results): + harness.check(iface.isSingleOperationInterface(), i < 4, + "Interface %s should be a single operation interface" % + iface.identifier.name) -- cgit v1.2.3