Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / imported / web-platform-tests / custom-elements / registering-custom-elements / definition-construction-algorithm-invalid-type.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>If TYPE is an invalid custom element type, throw SyntaxError</title>
5 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru">
6 <meta name="assert" content="If TYPE is an invalid custom element type, set ERROR to InvalidType and stop.">
7 <link rel="help" href="http://www.w3.org/TR/custom-elements/#registering-custom-elements">
8 <script src="../../../../resources/testharness.js"></script>
9 <script src="../../../../resources/testharnessreport.js"></script>
10 <script src="../testcommon.js"></script>
11 <link rel="stylesheet" href="../../../../resources/testharness.css">
12 </head>
13 <body>
14 <div id="log"></div>
15 <script>
16 test(function() {
17     var doc = newHTMLDocument();
18     assert_throws('SyntaxError', function() { doc.registerElement('1xa2'); },
19                   'Registering invalid custom element type should throw SyntaxError');
20 }, 'Registering invalid custom element type should throw SyntaxError');
21 </script>
22 </body>
23 </html>