aboutsummaryrefslogtreecommitdiffstats
path: root/third_party/WebIDL/tests/test_newobject.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_newobject.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_newobject.py')
-rw-r--r--third_party/WebIDL/tests/test_newobject.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/third_party/WebIDL/tests/test_newobject.py b/third_party/WebIDL/tests/test_newobject.py
index c12995a0e86..b30e9c58160 100644
--- a/third_party/WebIDL/tests/test_newobject.py
+++ b/third_party/WebIDL/tests/test_newobject.py
@@ -1,7 +1,7 @@
-# Import the WebIDL module, so we can do isinstance checks and whatnot
import WebIDL
+# Import the WebIDL module, so we can do isinstance checks and whatnot
def WebIDLTest(parser, harness):
# Basic functionality
parser.parse(
@@ -25,8 +25,8 @@ def WebIDLTest(parser, harness):
};
"""
)
- results = parser.finish()
- except:
+ parser.finish()
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "[NewObject] attributes must depend on something")
@@ -40,8 +40,8 @@ def WebIDLTest(parser, harness):
};
"""
)
- results = parser.finish()
- except:
+ parser.finish()
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "[NewObject] methods must depend on something")
@@ -55,8 +55,8 @@ def WebIDLTest(parser, harness):
};
"""
)
- results = parser.finish()
- except:
+ parser.finish()
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "[NewObject] attributes must not be [Cached]")
@@ -70,7 +70,7 @@ def WebIDLTest(parser, harness):
};
"""
)
- results = parser.finish()
- except:
+ parser.finish()
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "[NewObject] attributes must not be [StoreInSlot]")