 "e";
  el.setAttributeNode(attrNode);

  assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.name }),
                      ["a", "c"]);
  assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.value }),
                      ["e", "d"]);
}, "setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order");

test(function() {
  var el = document.createElement("div");
  el.setAttribute("foo", "bar");