diff options
Diffstat (limited to 'testing/web-platform/tests/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html')
-rw-r--r-- | testing/web-platform/tests/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html b/testing/web-platform/tests/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html new file mode 100644 index 000000000..5f2c09b4b --- /dev/null +++ b/testing/web-platform/tests/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> +<head> +<title>If TYPE is an invalid custom element type, throw SyntaxError</title> +<meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru"> +<meta name="assert" content="If TYPE is an invalid custom element type, set ERROR to InvalidType and stop."> +<link rel="help" href="http://www.w3.org/TR/custom-elements/#registering-custom-elements"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../testcommon.js"></script> +</head> +<body> +<div id="log"></div> +<script> +test(function() { + var doc = newHTMLDocument(); + assert_throws('SyntaxError', function() { doc.registerElement('1xa2'); }, + 'Registering invalid custom element type should throw SyntaxError'); +}, 'Registering invalid custom element type should throw SyntaxError'); +</script> +</body> +</html> |