1
0
Fork 0
firefox/dom/bindings/parser/tests/test_duplicate_qualifiers.py
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

67 lines
1.4 KiB
Python

import WebIDL
def WebIDLTest(parser, harness):
threw = False
try:
parser.parse(
"""
interface DuplicateQualifiers1 {
getter getter byte foo(unsigned long index);
};
"""
)
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
threw = False
try:
parser.parse(
"""
interface DuplicateQualifiers2 {
setter setter byte foo(unsigned long index, byte value);
};
"""
)
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
threw = False
try:
parser.parse(
"""
interface DuplicateQualifiers4 {
deleter deleter byte foo(unsigned long index);
};
"""
)
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
threw = False
try:
parser.parse(
"""
interface DuplicateQualifiers5 {
getter deleter getter byte foo(unsigned long index);
};
"""
)
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")