mirror of
https://github.com/servo/servo
synced 2026-05-01 11:57:31 +02:00
codegen: Throw on an invalid enum value when appropiate
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user