 assert_equals(elem.selected, true);

  elem.removeAttribute("selected");
  assert_equals(elem.selected, false);

  elem.defaultSelected = true
  assert_equals(elem.selected, true);

  elem.defaultSelected = false;
  assert_equals(elem.selected, false);
}, "not dirty");

test(function () {
  testDirty(true);
}, "dirty, selected");

test(function () {
  testDirty(false);
}, "dirty, not selected");

function testDirty(isSelected) {
  var elem = document.createElement("option");

  elem.selected = isSelected; 