summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/nodes/Document-createElementNS.js
blob: b390712aa17b5a413ccb94c8d0472c94ad1d6136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
var createElementNS_tests = [
  /* Arrays with three elements:
   *   the namespace argument
   *   the qualifiedName argument
   *   the expected exception, or null if none
   */
  [null, null, null],
  [null, undefined, null],
  [null, "foo", null],
  [null, "1foo", "INVALID_CHARACTER_ERR"],
  [null, "f1oo", null],
  [null, "foo1", null],
  [null, "\u0BC6foo", "INVALID_CHARACTER_ERR"],
  [null, "}foo", "INVALID_CHARACTER_ERR"],
  [null, "f}oo", "INVALID_CHARACTER_ERR"],
  [null, "foo}", "INVALID_CHARACTER_ERR"],
  [null, "\uFFFFfoo", "INVALID_CHARACTER_ERR"],
  [null, "f\uFFFFoo", "INVALID_CHARACTER_ERR"],
  [null, "foo\uFFFF", "INVALID_CHARACTER_ERR"],
  [null, "<foo", "INVALID_CHARACTER_ERR"],
  [null, "foo>", "INVALID_CHARACTER_ERR"],
  [null, "<foo>", "INVALID_CHARACTER_ERR"],
  [null, "f<oo", "INVALID_CHARACTER_ERR"],
  [null, "^^", "INVALID_CHARACTER_ERR"],
  [null, "fo o", "INVALID_CHARACTER_ERR"],
  [null, "-foo", "INVALID_CHARACTER_ERR"],
  [null, ".foo", "INVALID_CHARACTER_ERR"],
  [null, ":foo", "NAMESPACE_ERR"],
  [null, "f:oo", "NAMESPACE_ERR"],
  [null, "foo:", "NAMESPACE_ERR"],
  [null, "f:o:o", "NAMESPACE_ERR"],
  [null, ":", "NAMESPACE_ERR"],
  [null, "xml", null],
  [null, "xmlns", "NAMESPACE_ERR"],
  [null, "xmlfoo", null],
  [null, "xml:foo", "NAMESPACE_ERR"],
  [null, "xmlns:foo", "NAMESPACE_ERR"],
  [null, "xmlfoo:bar", "NAMESPACE_ERR"],
  [null, "null:xml", "NAMESPACE_ERR"],
  ["", null, null],
  ["", ":foo", "NAMESPACE_ERR"],
  ["", "f:oo", "NAMESPACE_ERR"],
  ["", "foo:", "NAMESPACE_ERR"],
  [undefined, null, null],
  [undefined, undefined, null],
  [undefined, "foo", null],
  [undefined, "1foo", "INVALID_CHARACTER_ERR"],
  [undefined, "f1oo", null],
  [undefined, "foo1", null],
  [undefined, ":foo", "NAMESPACE_ERR"],
  [undefined, "f:oo", "NAMESPACE_ERR"],
  [undefined, "foo:", "NAMESPACE_ERR"],
  [undefined, "f::oo", "NAMESPACE_ERR"],
  [undefined, "xml", null],
  [undefined, "xmlns", "NAMESPACE_ERR"],
  [undefined, "xmlfoo", null],
  [undefined, "xml:foo", "NAMESPACE_ERR"],
  [undefined, "xmlns:foo", "NAMESPACE_ERR"],
  [undefined, "xmlfoo:bar", "NAMESPACE_ERR"],
  ["http://example.com/", "foo", null],
  ["http://example.com/", "1foo", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "<foo>", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "fo<o", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "-foo", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", ".foo", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "f1oo", null],
  ["http://example.com/", "foo1", null],
  ["http://example.com/", ":foo", "NAMESPACE_ERR"],
  ["http://example.com/", "f:oo", null],
  ["http://example.com/", "f:o:o", "NAMESPACE_ERR"],
  ["http://example.com/", "foo:", "NAMESPACE_ERR"],
  ["http://example.com/", "f::oo", "NAMESPACE_ERR"],
  ["http://example.com/", "a:0", "NAMESPACE_ERR"],
  ["http://example.com/", "0:a", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "a:_", null],
  ["http://example.com/", "a:\u0BC6", "NAMESPACE_ERR"],
  ["http://example.com/", "\u0BC6:a", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "a:a\u0BC6", null],
  ["http://example.com/", "a\u0BC6:a", null],
  ["http://example.com/", "xml:test", "NAMESPACE_ERR"],
  ["http://example.com/", "xmlns:test", "NAMESPACE_ERR"],
  ["http://example.com/", "test:xmlns", null],
  ["http://example.com/", "xmlns", "NAMESPACE_ERR"],
  ["http://example.com/", "_:_", null],
  ["http://example.com/", "_:h0", null],
  ["http://example.com/", "_:test", null],
  ["http://example.com/", "l_:_", null],
  ["http://example.com/", "ns:_0", null],
  ["http://example.com/", "ns:a0", null],
  ["http://example.com/", "ns0:test", null],
  ["http://example.com/", "a.b:c", null],
  ["http://example.com/", "a-b:c", null],
  ["http://example.com/", "xml", null],
  ["http://example.com/", "xmlns", "NAMESPACE_ERR"],
  ["http://example.com/", "XMLNS", null],
  ["http://example.com/", "xmlfoo", null],
  ["http://example.com/", "xml:foo", "NAMESPACE_ERR"],
  ["http://example.com/", "XML:foo", null],
  ["http://example.com/", "xmlns:foo", "NAMESPACE_ERR"],
  ["http://example.com/", "XMLNS:foo", null],
  ["http://example.com/", "xmlfoo:bar", null],
  ["http://example.com/", "prefix::local", "NAMESPACE_ERR"],
  ["http://example.com/", "namespaceURI:{", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:}", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:~", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:'", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:!", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:@", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:#", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:$", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:%", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:^", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:&", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:*", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:(", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:)", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:+", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:=", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:[", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:]", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:\\", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:/", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:;", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:`", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:<", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:>", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:,", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:a ", "INVALID_CHARACTER_ERR"],
  ["http://example.com/", "namespaceURI:\"", "INVALID_CHARACTER_ERR"],
  ["/", "foo", null],
  ["/", "1foo", "INVALID_CHARACTER_ERR"],
  ["/", "f1oo", null],
  ["/", "foo1", null],
  ["/", ":foo", "NAMESPACE_ERR"],
  ["/", "f:oo", null],
  ["/", "foo:", "NAMESPACE_ERR"],
  ["/", "xml", null],
  ["/", "xmlns", "NAMESPACE_ERR"],
  ["/", "xmlfoo", null],
  ["/", "xml:foo", "NAMESPACE_ERR"],
  ["/", "xmlns:foo", "NAMESPACE_ERR"],
  ["/", "xmlfoo:bar", null],
  ["http://www.w3.org/XML/1998/namespace", "foo", null],
  ["http://www.w3.org/XML/1998/namespace", "1foo", "INVALID_CHARACTER_ERR"],
  ["http://www.w3.org/XML/1998/namespace", "f1oo", null],
  ["http://www.w3.org/XML/1998/namespace", "foo1", null],
  ["http://www.w3.org/XML/1998/namespace", ":foo", "NAMESPACE_ERR"],
  ["http://www.w3.org/XML/1998/namespace", "f:oo", null],
  ["http://www.w3.org/XML/1998/namespace", "foo:", "NAMESPACE_ERR"],
  ["http://www.w3.org/XML/1998/namespace", "xml", null],
  ["http://www.w3.org/XML/1998/namespace", "xmlns", "NAMESPACE_ERR"],
  ["http://www.w3.org/XML/1998/namespace", "xmlfoo", null],
  ["http://www.w3.org/XML/1998/namespace", "xml:foo", null],
  ["http://www.w3.org/XML/1998/namespace", "xmlns:foo", "NAMESPACE_ERR"],
  ["http://www.w3.org/XML/1998/namespace", "xmlfoo:bar", null],
  ["http://www.w3.org/XML/1998/namespaces", "xml:foo", "NAMESPACE_ERR"],
  ["http://www.w3.org/xml/1998/namespace", "xml:foo", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "foo", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "1foo", "INVALID_CHARACTER_ERR"],
  ["http://www.w3.org/2000/xmlns/", "f1oo", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "foo1", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", ":foo", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "f:oo", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "foo:", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "xml", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "xmlns", null],
  ["http://www.w3.org/2000/xmlns/", "xmlfoo", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "xml:foo", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "xmlns:foo", null],
  ["http://www.w3.org/2000/xmlns/", "xmlfoo:bar", "NAMESPACE_ERR"],
  ["http://www.w3.org/2000/xmlns/", "foo:xmlns", "NAMESPACE_ERR"],
  ["foo:", "foo", null],
  ["foo:", "1foo", "INVALID_CHARACTER_ERR"],
  ["foo:", "f1oo", null],
  ["foo:", "foo1", null],
  ["foo:", ":foo", "NAMESPACE_ERR"],
  ["foo:", "f:oo", null],
  ["foo:", "foo:", "NAMESPACE_ERR"],
  ["foo:", "xml", null],
  ["foo:", "xmlns", "NAMESPACE_ERR"],
  ["foo:", "xmlfoo", null],
  ["foo:", "xml:foo", "NAMESPACE_ERR"],
  ["foo:", "xmlns:foo", "NAMESPACE_ERR"],
  ["foo:", "xmlfoo:bar", null],
]