Skip to content

Commit

Permalink
codegen: Throw on an invalid enum value when appropiate
Browse files Browse the repository at this point in the history
emilio authored and Ms2ger committed May 30, 2016
1 parent 929bd75 commit 9618706
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions domparsing/DOMParser-parseFromString-html.html
Original file line number Diff line number Diff line change
@@ -61,4 +61,10 @@
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>

0 comments on commit 9618706

Please sign in to comment.