| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = '13.5.4.3.js'; |
| 8 |
|
| 9 |
START("13.5.4.3 - XMLList attributes()"); |
| 10 |
|
| 11 |
TEST(1, true, XMLList.prototype.hasOwnProperty("attributes")); |
| 12 |
|
| 13 |
|
| 14 |
x = new XMLList() |
| 15 |
TEST(2, "xml", typeof(x.attributes())); |
| 16 |
TEST_XML(3, "", x.attributes()); |
| 17 |
|
| 18 |
|
| 19 |
x += <alpha attr1="value1" attr2="value2">one</alpha>; |
| 20 |
|
| 21 |
TEST(4, "xml", typeof(x.attributes())); |
| 22 |
correct = new XMLList(); |
| 23 |
correct += new XML("value1"); |
| 24 |
correct += new XML("value2"); |
| 25 |
TEST(5, correct, x.attributes()); |
| 26 |
|
| 27 |
|
| 28 |
x += <bravo attr3="value3" attr4="value4">two</bravo>; |
| 29 |
|
| 30 |
TEST(6, "xml", typeof(x.attributes())); |
| 31 |
correct = new XMLList(); |
| 32 |
correct += new XML("value1"); |
| 33 |
correct += new XML("value2"); |
| 34 |
correct += new XML("value3"); |
| 35 |
correct += new XML("value4"); |
| 36 |
TEST(7, correct, x.attributes()); |
| 37 |
|
| 38 |
END(); |