mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
c2e642fbcc
--HG-- rename : js/xpconnect/tests/mochitest/test_bug462428.html => dom/bindings/test/test_lookupGetter.html
26 lines
844 B
Python
26 lines
844 B
Python
import WebIDL
|
|
|
|
def WebIDLTest(parser, harness):
|
|
parser.parse("""
|
|
interface TestArrayBuffer {
|
|
attribute ArrayBuffer attr;
|
|
void method(ArrayBuffer arg1, ArrayBuffer? arg2, ArrayBuffer[] arg3, sequence<ArrayBuffer> arg4);
|
|
};
|
|
""")
|
|
|
|
results = parser.finish()
|
|
|
|
iface = results[0]
|
|
|
|
harness.ok(True, "TestArrayBuffer interface parsed without error")
|
|
harness.check(len(iface.members), 2, "Interface should have two members")
|
|
|
|
attr = iface.members[0]
|
|
method = iface.members[1]
|
|
|
|
harness.ok(isinstance(attr, WebIDL.IDLAttribute), "Expect an IDLAttribute")
|
|
harness.ok(isinstance(method, WebIDL.IDLMethod), "Expect an IDLMethod")
|
|
|
|
harness.check(str(attr.type), "ArrayBuffer", "Expect an ArrayBuffer type")
|
|
harness.ok(attr.type.isArrayBuffer(), "Expect an ArrayBuffer type")
|