mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
codegen: Throw on an invalid enum value when appropiate
This commit is contained in:
parent
093f5c01e4
commit
e50d4b7624
5 changed files with 56 additions and 10 deletions
|
@ -61,4 +61,10 @@ test(function() {
|
|||
assert_equals(htmldoc.documentElement.localName, "html");
|
||||
assert_equals(htmldoc.documentElement.namespaceURI, "http://www.w3.org/1999/xhtml");
|
||||
}, "DOMParser parses HTML tag soup with no problems");
|
||||
|
||||
test(function() {
|
||||
assert_throws(new TypeError(), function() {
|
||||
new DOMParser().parseFromString("", "text/foo-this-is-invalid");
|
||||
})
|
||||
}, "DOMParser throws on an invalid enum value")
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue