Index: sky/tests/lowlevel/attribute-collection.sky |
diff --git a/sky/tests/lowlevel/attribute-collection.sky b/sky/tests/lowlevel/attribute-collection.sky |
index c6380e0d59c5acb6883cd2c640ac236c515c1f04..33817def468511ba56d1c8a6b9bba474010bf15f 100644 |
--- a/sky/tests/lowlevel/attribute-collection.sky |
+++ b/sky/tests/lowlevel/attribute-collection.sky |
@@ -24,6 +24,16 @@ describe("Attribute collection", function() { |
assert.equal(div.attributes.attr0.value, "value0"); |
assert.equal(div.attributes.attr1.value, "value1"); |
}); |
+ it("should get all at once", function() { |
+ div.setAttribute("attr0", "value0"); |
+ div.setAttribute("attr1", "value1"); |
+ var attrs = div.getAttributes(); |
+ assert.equal(attrs.length, 2); |
+ assert.equal(attrs[0].name, "attr0"); |
+ assert.equal(attrs[0].value, "value0"); |
+ assert.equal(attrs[1].name, "attr1"); |
+ assert.equal(attrs[1].value, "value1"); |
+ }); |
it("should set by name", function() { |
div.setAttribute("attrName", "value0"); |
div.attributes.attrName.value = "new value"; |