diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-09 05:04:57 -0700 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-09 05:04:57 -0700 |
commit | b054cb82a6b50b07209c9a8670076d1d9ed61605 (patch) | |
tree | a37a6d2a58efa219e7820b67de5ed3af44ab2191 /components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py | |
parent | 9a8c81773a7dc51301e52ce3f02f8ea55984365a (diff) | |
parent | d3528ffce4092e0b28b9494f96555368bf8945b9 (diff) | |
download | servo-b054cb82a6b50b07209c9a8670076d1d9ed61605.tar.gz servo-b054cb82a6b50b07209c9a8670076d1d9ed61605.zip |
Auto merge of #9890 - AgostonSzepessy:update-webidl-tests, r=nox
update.sh downloads all *.py tests from mozilla central
components/script/dom/bindings/codegen/parser/update.sh downloads all *.py tests from https://dxr.mozilla.org/mozilla-central/source/dom/bindings/parser/tests
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9890)
<!-- Reviewable:end -->
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.py | 47 |
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) |