OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html xmlns="http://www.w3.org/1999/xhtml"> | 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
3 <head> | 3 <head> |
4 <title>DOM L3 Core: Node Interface prefix property setter</title> | 4 <title>DOM L3 Core: Node Interface prefix property setter</title> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script src="../../js/resources/js-test-pre.js"></script> | 7 <script src="../../../resources/js-test.js"></script> |
8 <script> | 8 <script> |
9 description('Test for the implementation of DOM Level 3 Core API on Node Interfa
ce: prefix setter. INVALID_CHARACTER_ERR: Raised if the specified prefix contain
s an illegal character according to the XML version in use specified in the Docu
ment.xmlVersion attribute. <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.
html#ID-NodeNSPrefix">http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSP
refix</a>'); | 9 description('Test for the implementation of DOM Level 3 Core API on Node Interfa
ce: prefix setter. INVALID_CHARACTER_ERR: Raised if the specified prefix contain
s an illegal character according to the XML version in use specified in the Docu
ment.xmlVersion attribute. <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.
html#ID-NodeNSPrefix">http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSP
refix</a>'); |
10 | 10 |
11 var prefixedElem = document.createElementNS("ns1", "pre1:foo"); | 11 var prefixedElem = document.createElementNS("ns1", "pre1:foo"); |
12 document.body.appendChild(prefixedElem); | 12 document.body.appendChild(prefixedElem); |
13 | 13 |
14 function test(prefix, expectedToThrow) { | 14 function test(prefix, expectedToThrow) { |
15 prefixedElem.prefix = "before"; | 15 prefixedElem.prefix = "before"; |
16 if (expectedToThrow) { | 16 if (expectedToThrow) { |
17 shouldThrow('prefixedElem.prefix = ' + prefix); | 17 shouldThrow('prefixedElem.prefix = ' + prefix); |
(...skipping 10 matching lines...) Expand all Loading... |
28 test('"a0"', false); | 28 test('"a0"', false); |
29 test('"_0"', false); | 29 test('"_0"', false); |
30 test('"\xD7"', true); | 30 test('"\xD7"', true); |
31 test('"\xB7"', true); | 31 test('"\xB7"', true); |
32 test('"aa"', false); | 32 test('"aa"', false); |
33 test('"\\n"', true); | 33 test('"\\n"', true); |
34 </script> | 34 </script> |
35 </body> | 35 </body> |
36 </html> | 36 </html> |
37 | 37 |
OLD | NEW |