cted orientation to change");
      break;
    }
    await screen.orientation.lock(initialOrientation);
  }
}, "Test that screen.orientation.lock returns a pending promise.");

promise_test(async t => {
  t.add_cleanup(makeCleanup());
  await test_driver.bless("request full screen")
  await document.documentElement.requestFullscreen();
  const initialType = screen.orientation.type;
  const newType = getOppositeOrientation();
  const p = screen.orientation.lock(newType);
  assert_equals(screen.orientation.ty