pe, initialType, "Must not change orientation until next spin of event loop");
  await p;
  const finalType = screen.orientation.type;
  assert_true(finalType.startsWith(newType), `Expected type to start with ${newType}, got "${finalType}"`);
}, "Test that screen.orientation.lock() is actually async");
</script>
