nB.selected, "B becomes selected after first move");
  assert_false(optionC.selected, "C is not selected after first move");

  document.body.moveBefore(optionB, null);
  assert_true(optionA.selected, "A STILL selected after second move");
  assert_true(optionB.selected, "B STILL selected after it is moved out");
  assert_true(optionC.selected, "C becomes selected after second move");

  // Move A back into <select> before C.
  document.querySelector('select').moveBefore(optionA, optionC);
  assert_true(opt