4 def WebIDLTest(parser
, harness
):
7 callback interface TestCallbackInterface {
8 attribute boolean bool;
13 results
= parser
.finish()
17 harness
.ok(iface
.isCallback(), "Interface should be a callback")
19 parser
= parser
.reset()
24 interface TestInterface {
26 callback interface TestCallbackInterface : TestInterface {
27 attribute boolean bool;
32 except WebIDL
.WebIDLError
:
35 harness
.ok(threw
, "Should not allow non-callback parent of callback interface")
37 parser
= parser
.reset()
42 interface TestInterface : TestCallbackInterface {
44 callback interface TestCallbackInterface {
45 attribute boolean bool;
50 except WebIDL
.WebIDLError
:
53 harness
.ok(threw
, "Should not allow callback parent of non-callback interface")
55 parser
= parser
.reset()
58 callback interface TestCallbackInterface1 {
61 callback interface TestCallbackInterface2 {
62 undefined foo(DOMString arg);
63 undefined foo(TestCallbackInterface1 arg);
65 callback interface TestCallbackInterface3 {
66 undefined foo(DOMString arg);
67 undefined foo(TestCallbackInterface1 arg);
68 static undefined bar();
70 callback interface TestCallbackInterface4 {
71 undefined foo(DOMString arg);
72 undefined foo(TestCallbackInterface1 arg);
73 static undefined bar();
76 callback interface TestCallbackInterface5 {
77 static attribute boolean bool;
80 callback interface TestCallbackInterface6 {
81 undefined foo(DOMString arg);
82 undefined foo(TestCallbackInterface1 arg);
85 callback interface TestCallbackInterface7 {
86 static attribute boolean bool;
88 callback interface TestCallbackInterface8 {
89 attribute boolean bool;
91 callback interface TestCallbackInterface9 : TestCallbackInterface1 {
94 callback interface TestCallbackInterface10 : TestCallbackInterface1 {
99 results
= parser
.finish()
100 for i
, iface
in enumerate(results
):
102 iface
.isSingleOperationInterface(),
104 "Interface %s should be a single operation interface"
105 % iface
.identifier
.name
,