| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = '13.4.4.24.js'; |
| 8 |
|
| 9 |
START("13.4.4.24 - XML namespaceDeclarations()"); |
| 10 |
|
| 11 |
TEST(1, true, XML.prototype.hasOwnProperty("namespaceDeclarations")); |
| 12 |
|
| 13 |
x = |
| 14 |
<foo:alpha xmlns:foo="http://foo/" xmlns:bar="http://bar/"> |
| 15 |
<foo:bravo>one</foo:bravo> |
| 16 |
</foo:alpha>; |
| 17 |
|
| 18 |
y = x.namespaceDeclarations(); |
| 19 |
|
| 20 |
TEST(2, 2, y.length); |
| 21 |
TEST(3, "object", typeof(y[0])); |
| 22 |
TEST(4, "object", typeof(y[1])); |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
TEST(5, true, y.some(function(e) { |
| 29 |
return ((e.prefix === 'foo') && |
| 30 |
(Namespace("http://foo/") == e)); |
| 31 |
})); |
| 32 |
|
| 33 |
TEST(6, true, y.some(function(e) { |
| 34 |
return ((e.prefix === 'bar') && |
| 35 |
(Namespace("http://bar/") == e)); |
| 36 |
})); |
| 37 |
|
| 38 |
END(); |