Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / Element / setAttributeNS-namespace-err-expected.txt
1 setAttributeNS tests adapted from createAttributeNS which in turn were adapted from createElementNS tests attached to webkit bug 16833
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 PASS element.setAttributeNS(undefined, undefined, 'value')
7 PASS element.setAttributeNS(null, undefined, 'value')
8 FAIL element.setAttributeNS(undefined, null, 'value')
9 FAIL element.setAttributeNS(null, null, 'value')
10 PASS element.setAttributeNS(null, "", 'value'); threw INVALID_CHARACTER_ERR
11 FAIL element.setAttributeNS("", null, 'value')
12 PASS element.setAttributeNS("", "", 'value'); threw INVALID_CHARACTER_ERR
13 PASS element.setAttributeNS(null, "<div>", 'value'); threw INVALID_CHARACTER_ERR
14 PASS element.setAttributeNS(null, "0div", 'value'); threw INVALID_CHARACTER_ERR
15 PASS element.setAttributeNS(null, "di v", 'value'); threw INVALID_CHARACTER_ERR
16 PASS element.setAttributeNS(null, "di<v", 'value'); threw INVALID_CHARACTER_ERR
17 PASS element.setAttributeNS(null, "-div", 'value'); threw INVALID_CHARACTER_ERR
18 PASS element.setAttributeNS(null, ".div", 'value'); threw INVALID_CHARACTER_ERR
19 PASS element.setAttributeNS("http://example.com/", "<div>", 'value'); threw INVALID_CHARACTER_ERR
20 PASS element.setAttributeNS("http://example.com/", "0div", 'value'); threw INVALID_CHARACTER_ERR
21 PASS element.setAttributeNS("http://example.com/", "di<v", 'value'); threw INVALID_CHARACTER_ERR
22 PASS element.setAttributeNS("http://example.com/", "-div", 'value'); threw INVALID_CHARACTER_ERR
23 PASS element.setAttributeNS("http://example.com/", ".div", 'value'); threw INVALID_CHARACTER_ERR
24 PASS element.setAttributeNS(null, ":div", 'value'); threw NAMESPACE_ERR
25 PASS element.setAttributeNS(null, "div:", 'value'); threw NAMESPACE_ERR
26 PASS element.setAttributeNS("http://example.com/", ":div", 'value'); threw NAMESPACE_ERR
27 PASS element.setAttributeNS("http://example.com/", "div:", 'value'); threw NAMESPACE_ERR
28 PASS element.setAttributeNS(null, "d:iv", 'value'); threw NAMESPACE_ERR
29 PASS element.setAttributeNS(null, "a:b:c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
30 PASS element.setAttributeNS("http://example.com/", "a:b:c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
31 PASS element.setAttributeNS(null, "a::c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
32 PASS element.setAttributeNS("http://example.com/", "a::c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
33 PASS element.setAttributeNS("http://example.com/", "a:0", 'value'); valid XML name, not a valid QName; threw INVALID_CHARACTER_ERR
34 PASS element.setAttributeNS("http://example.com/", "0:a", 'value'); 0 at start makes it not a valid XML name; threw INVALID_CHARACTER_ERR
35 PASS element.setAttributeNS("http://example.com/", "a:_", 'value')
36 FAIL element.setAttributeNS("http://example.com/", "a:ெ", 'value'); non-ASCII character after colon is CombiningChar, which is NCNameChar but not (Letter | "_") so invalid at start of NCName (but still a valid XML name, hence not INVALID_CHARACTER_ERR); expected NAMESPACE_ERR, threw INVALID_CHARACTER_ERR
37 PASS element.setAttributeNS("http://example.com/", "ெ:a", 'value'); non-ASCII character after colon is CombiningChar, which is NCNameChar but not (Letter | "_") so invalid at start of NCName (Gecko chooses to throw NAMESPACE_ERR here, but either is valid as this is both an invalid XML name and an invalid QName); threw INVALID_CHARACTER_ERR
38 PASS element.setAttributeNS("http://example.com/", "a:aெ", 'value')
39 PASS element.setAttributeNS("http://example.com/", "aெ:a", 'value')
40 PASS element.setAttributeNS("http://example.com/", "xml:test", 'value'); binding xml prefix wrong; threw NAMESPACE_ERR
41 PASS element.setAttributeNS("http://example.com/", "xmlns:test", 'value'); binding xmlns prefix wrong; threw NAMESPACE_ERR
42 PASS element.setAttributeNS("http://www.w3.org/2000/xmlns/", "x:test", 'value'); binding namespace namespace to wrong prefix; threw NAMESPACE_ERR
43 PASS element.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:test", 'value')
44 PASS element.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:test", 'value')
45 PASS element.setAttributeNS("http://www.w3.org/XML/1998/namespace", "x:test", 'value')
46 PASS element.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", 'value')
47 PASS element.setAttributeNS("http://example.com/", "xmlns", 'value'); threw NAMESPACE_ERR
48 PASS successfullyParsed is true
49
50 TEST COMPLETE
51