sert_equals(document['test'], img);
}, "img elements that have a name and id attribute with same value.");

test(function() {
  let img = document.getElementsByTagName("img")[2];
  assert_equals(document.test2a, img);
  assert_equals(document['test2a'], img);
  assert_equals(document.test2b, img);
  assert_equals(document['test2b'], img);

  img.removeAttribute("name");
  assert_equals(document.test2a, undefined);
  assert_equals(document['test2a'], undefined);
  assert_equals(document.test2b, undefined);
 