ionIndex) {
      assert_false(selectMenu.children[i].selected);
    }
  }
  assert_true(selectMenu.children[selectedOptionIndex].selected, msg);
  assert_equals(selectMenu.value, selectMenu.children[selectedOptionIndex].value);
}

test(() => {
  let selectMenu = createSelectMenu(5);

  selectMenu.children[4].selected = true;
  checkSelection(selectMenu, 4);

  selectMenu.children[4].remove();
  checkSelection(selectMenu, 0, "After removing the selected option, selection should default to first option.");

