aboutsummaryrefslogtreecommitdiffstats
path: root/third_party/WebIDL/tests/test_const.py
diff options
context:
space:
mode:
authorNgo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me>2024-06-15 13:22:42 +0900
committerGitHub <noreply@github.com>2024-06-15 04:22:42 +0000
commit8eed3b442b214f678b80dbcc7dca07eeaa1e26ff (patch)
treef8a232e86616e8e5fd234e7bbb32bed4ff7077f2 /third_party/WebIDL/tests/test_const.py
parent19067366df28c9131dcbc436bc96a27e64e0a194 (diff)
downloadservo-8eed3b442b214f678b80dbcc7dca07eeaa1e26ff.tar.gz
servo-8eed3b442b214f678b80dbcc7dca07eeaa1e26ff.zip
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
Diffstat (limited to 'third_party/WebIDL/tests/test_const.py')
-rw-r--r--third_party/WebIDL/tests/test_const.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/WebIDL/tests/test_const.py b/third_party/WebIDL/tests/test_const.py
index f2d4b79d467..da83db41ef5 100644
--- a/third_party/WebIDL/tests/test_const.py
+++ b/third_party/WebIDL/tests/test_const.py
@@ -64,7 +64,7 @@ def WebIDLTest(parser, harness):
len(iface.members), len(expected), "Expect %s members" % len(expected)
)
- for (const, (QName, name, type, value)) in zip(iface.members, expected):
+ for const, (QName, name, type, value) in zip(iface.members, expected):
harness.ok(isinstance(const, WebIDL.IDLConst), "Should be an IDLConst")
harness.ok(const.isConst(), "Const is a const")
harness.ok(not const.isAttr(), "Const is not an attr")
@@ -91,6 +91,6 @@ def WebIDLTest(parser, harness):
"""
)
parser.finish()
- except:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Nullable types are not allowed for consts.")