aboutsummaryrefslogtreecommitdiffstats
path: root/third_party/WebIDL/tests/test_namespace.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebIDL/tests/test_namespace.py')
-rw-r--r--third_party/WebIDL/tests/test_namespace.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/third_party/WebIDL/tests/test_namespace.py b/third_party/WebIDL/tests/test_namespace.py
index 247c5b22232..5812364dddc 100644
--- a/third_party/WebIDL/tests/test_namespace.py
+++ b/third_party/WebIDL/tests/test_namespace.py
@@ -1,3 +1,6 @@
+import WebIDL
+
+
def WebIDLTest(parser, harness):
parser.parse(
"""
@@ -71,7 +74,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -87,7 +90,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -107,7 +110,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -127,7 +130,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -147,7 +150,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -167,7 +170,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -187,7 +190,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -207,7 +210,7 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@@ -227,6 +230,6 @@ def WebIDLTest(parser, harness):
)
results = parser.finish()
- except Exception as x:
+ except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")