OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("setAttributeNS tests adapted from createAttributeNS which in turn w
ere adapted from createElementNS tests attached to webkit bug 16833"); | 8 description("setAttributeNS tests adapted from createAttributeNS which in turn w
ere adapted from createElementNS tests attached to webkit bug 16833"); |
9 | 9 |
10 function assert(c, m) | 10 function assert(c, m) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 { args: [null, "0div"], code: 5 }, | 53 { args: [null, "0div"], code: 5 }, |
54 { args: [null, "di v"], code: 5 }, | 54 { args: [null, "di v"], code: 5 }, |
55 { args: [null, "di<v"], code: 5 }, | 55 { args: [null, "di<v"], code: 5 }, |
56 { args: [null, "-div"], code: 5 }, | 56 { args: [null, "-div"], code: 5 }, |
57 { args: [null, ".div"], code: 5 }, | 57 { args: [null, ".div"], code: 5 }, |
58 { args: ["http://example.com/", "<div>"], code: 5 }, | 58 { args: ["http://example.com/", "<div>"], code: 5 }, |
59 { args: ["http://example.com/", "0div"], code: 5 }, | 59 { args: ["http://example.com/", "0div"], code: 5 }, |
60 { args: ["http://example.com/", "di<v"], code: 5 }, | 60 { args: ["http://example.com/", "di<v"], code: 5 }, |
61 { args: ["http://example.com/", "-div"], code: 5 }, | 61 { args: ["http://example.com/", "-div"], code: 5 }, |
62 { args: ["http://example.com/", ".div"], code: 5 }, | 62 { args: ["http://example.com/", ".div"], code: 5 }, |
63 { args: [null, ":div"], code: 14 }, | 63 { args: [null, ":div"], code: 5 }, |
64 { args: [null, "div:"], code: 14 }, | 64 { args: [null, "div:"], code: 5 }, |
65 { args: ["http://example.com/", ":div"], code: 14 }, | 65 { args: ["http://example.com/", ":div"], code: 5 }, |
66 { args: ["http://example.com/", "div:"], code: 14 }, | 66 { args: ["http://example.com/", "div:"], code: 5 }, |
67 { args: [null, "d:iv"], code: 14 }, | 67 { args: [null, "d:iv"], code: 14 }, |
68 { args: [null, "a:b:c"], code: 14, message: "valid XML name, invalid QName" }
, | 68 { args: [null, "a:b:c"], code: 5, message: "valid XML name, invalid QName" }, |
69 { args: ["http://example.com/", "a:b:c"], code: 14, message: "valid XML name,
invalid QName" }, | 69 { args: ["http://example.com/", "a:b:c"], code: 5, message: "valid XML name,
invalid QName" }, |
70 { args: [null, "a::c"], code: 14, message: "valid XML name, invalid QName" }, | 70 { args: [null, "a::c"], code: 5, message: "valid XML name, invalid QName" }, |
71 { args: ["http://example.com/", "a::c"], code: 14, message: "valid XML name,
invalid QName" }, | 71 { args: ["http://example.com/", "a::c"], code: 5, message: "valid XML name, i
nvalid QName" }, |
72 { args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, no
t a valid QName" }, | 72 { args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, no
t a valid QName" }, |
73 { args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes i
t not a valid XML name" }, | 73 { args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes i
t not a valid XML name" }, |
74 { args: ["http://example.com/", "a:_"] }, | 74 { args: ["http://example.com/", "a:_"] }, |
75 { args: ["http://example.com/", "a:\u0BC6"], code: 14, | 75 { args: ["http://example.com/", "a:\u0BC6"], code: 14, |
76 message: "non-ASCII character after colon is CombiningChar, which is " + | 76 message: "non-ASCII character after colon is CombiningChar, which is " + |
77 "NCNameChar but not (Letter | \"_\") so invalid at start of " + | 77 "NCNameChar but not (Letter | \"_\") so invalid at start of " + |
78 "NCName (but still a valid XML name, hence not INVALID_CHARACTER_E
RR)" }, | 78 "NCName (but still a valid XML name, hence not INVALID_CHARACTER_E
RR)" }, |
79 { args: ["http://example.com/", "\u0BC6:a"], code: 5, | 79 { args: ["http://example.com/", "\u0BC6:a"], code: 5, |
80 message: "non-ASCII character after colon is CombiningChar, which is " + | 80 message: "non-ASCII character after colon is CombiningChar, which is " + |
81 "NCNameChar but not (Letter | \"_\") so invalid at start of " + | 81 "NCNameChar but not (Letter | \"_\") so invalid at start of " + |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } catch (e) { | 128 } catch (e) { |
129 assertEquals(e.code, test.code || "expected no exception", msg); | 129 assertEquals(e.code, test.code || "expected no exception", msg); |
130 } | 130 } |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 runNSTests(); | 134 runNSTests(); |
135 </script> | 135 </script> |
136 </body> | 136 </body> |
137 </html> | 137 </html> |
OLD | NEW |