4 <title>Chars allowed for custom element type </title>
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
6 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru">
7 <meta name="assert" content="The custom element type identifies a custom element interface and is a sequence of characters that must match the NCName production">
8 <link rel="help" href="https://dvcs.w3.org/hg/webcomponents/raw-file/default/spec/custom/index.html#concepts">
9 <link rel="help" href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">
10 <script src="../../../../resources/testharness.js"></script>
11 <script src="../../../../resources/testharnessreport.js"></script>
12 <script src="../testcommon.js"></script>
13 <link rel="stylesheet" href="../../../../resources/testharness.css">
18 function composeName(charCode) {
19 return 'x-' + String.fromCharCode(charCode) + '-x' + charCode.toString(16);
22 // NCName definition from http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName
23 // NCName ::= (Letter | '_') (NCNameChar)*
24 // NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender
25 // Letter ::= BaseChar | Ideographic
28 baseCharsSingle.testEach(composeName, checkValidName);
29 baseCharsRanges.testEach(composeName, checkValidName);
30 }, 'Registering valid custom element types with base char');
33 ideographicCharsSingle.testEach(composeName, checkValidName);
34 ideographicCharsRanges.testEach(composeName, checkValidName);
35 }, 'Registering valid custom element types with ideographic char');
38 digitCharsRanges.testEach(composeName, checkValidName);
39 }, 'Registering valid custom element types with digit chars');
42 (new CharsArray(['.', '-', '_'])).testEach(composeName, checkValidName)
43 }, 'Registering valid custom element types with characters \'.\', \'-\', \'_\'');
46 combiningChars.testEach(composeName, checkValidName);
47 }, 'Registering valid custom element types with combining char');
50 extenderChars.testEach(composeName, checkValidName);
51 }, 'Registering valid custom element types with extender char');