mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Update WebIDL.py (#32495)
* 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
This commit is contained in:
parent
19067366df
commit
8eed3b442b
77 changed files with 1658 additions and 793 deletions
10
third_party/WebIDL/tests/test_union.py
vendored
10
third_party/WebIDL/tests/test_union.py
vendored
|
@ -1,7 +1,7 @@
|
|||
import WebIDL
|
||||
import itertools
|
||||
import string
|
||||
|
||||
import WebIDL
|
||||
|
||||
# We'd like to use itertools.chain but it's 2.6 or higher.
|
||||
|
||||
|
||||
|
@ -91,7 +91,7 @@ def WebIDLTest(parser, harness):
|
|||
interface PrepareForTest {
|
||||
"""
|
||||
)
|
||||
for (i, type) in enumerate(types):
|
||||
for i, type in enumerate(types):
|
||||
interface += string.Template(
|
||||
"""
|
||||
readonly attribute ${type} attr${i};
|
||||
|
@ -157,7 +157,7 @@ def WebIDLTest(parser, harness):
|
|||
interface TestUnion {
|
||||
"""
|
||||
)
|
||||
for (i, type) in enumerate(validUnionTypes):
|
||||
for i, type in enumerate(validUnionTypes):
|
||||
interface += string.Template(
|
||||
"""
|
||||
undefined method${i}(${type} arg);
|
||||
|
@ -190,7 +190,7 @@ def WebIDLTest(parser, harness):
|
|||
try:
|
||||
parser.parse(interface)
|
||||
results = parser.finish()
|
||||
except:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue