| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = '13.4.4.36.js'; |
| 8 |
|
| 9 |
START("13.4.4.36 - setNamespace"); |
| 10 |
|
| 11 |
TEST(1, true, XML.prototype.hasOwnProperty("setNamespace")); |
| 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 |
correct = |
| 19 |
<bar:alpha xmlns:foo="http://foo/" xmlns:bar="http://bar/"> |
| 20 |
<foo:bravo>one</foo:bravo> |
| 21 |
</bar:alpha>; |
| 22 |
|
| 23 |
x.setNamespace("http://bar/"); |
| 24 |
|
| 25 |
TEST(2, correct, x); |
| 26 |
|
| 27 |
var xhtml1NS = new Namespace('http://www.w3.org/1999/xhtml'); |
| 28 |
var xhtml = <html />; |
| 29 |
xhtml.setNamespace(xhtml1NS); |
| 30 |
|
| 31 |
TEST(3, 1, xhtml.namespaceDeclarations().length); |
| 32 |
|
| 33 |
TEST(4, xhtml1NS, xhtml.namespace()); |
| 34 |
|
| 35 |
END(); |