aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py')
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py47
1 files changed, 47 insertions, 0 deletions
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)