mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
* Update WebIDL.py * Update WebIDL.py * Add builtin-array.patch * Fix CodegenRust.py and Configuration.py * Fix missing downcasts * mach fmt * Update check and comment to explain why we need this check * Update Global of DissimilarOriginWindow.webidl
67 lines
1.4 KiB
Python
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.")
|