Skip to content

[remote-playback] Fix specific manual tests - #64394

Open
markafoltz wants to merge 1 commit into
markafoltz/remote-playback-1-general-fixesfrom
markafoltz/remote-playback-2-test-fixes
Open

markafoltz wants to merge 1 commit into
markafoltz/remote-playback-1-general-fixesfrom
markafoltz/remote-playback-2-test-fixes

Conversation

@markafoltz

@markafoltz markafoltz commented Oct 30, 2026 •

Copy link
Copy Markdown
Member
  • utils.js: add promptOnClick(), which calls prompt() synchronously from
    a click handler so it runs with transient activation, plus
    waitForEvent() and logRemotePlaybackEvents().
  • prompt-and-select-device-manual.html and
    state-attribute-changes-when-selecting-device-manual.html: replace the
    outer async_test, which passed as soon as the button was clicked, with
    a single promise_test that waits for metadata, calls prompt() from the
    click handler, and checks the result. state-attribute-changes
    previously called prompt() from a watchAvailability() callback, which
    may run after transient activation has expired.
  • prompt-and-watch-availability-no-device-manual.html: check
    availability in the watchAvailability() callback (which runs after the
    returned Promise resolves), call prompt() from the click handler, and
    accept NotFoundError (no UI shown) or NotAllowedError (UI shown and
    cancelled by the user).
  • prompt-and-watch-availability-with-device-manual.html: check that the
    watchAvailability() callback reports true before prompting (instead of
    once after prompt() resolves), only enable the prompt button once a
    device is available, and report the actual rejection reason if
    prompt() fails.
  • event-handlers-manual.html: use the onconnecting/onconnect/
    ondisconnect event handler attributes, and split into two sequential
    tests: connecting via prompt(), and disconnecting via a second
    prompt(). Check the state when each event fires.

Stack created with GitHub Stacks CLI • Give Feedback 💬


Part of stack https://github.com/web-platform-tests/wpt/stack/64397 (each PR shows only its own layer):

  1. [remote-playback] Use longer media and wait for metadata before prompting #64393 General test fixups (longer media, wait for metadata)
  2. [remote-playback] Fix specific manual tests #64394 Fixes for specific tests
  3. [remote-playback] Add manual test for browser or device initiated disconnect #64395 New tests that do not depend on spec changes
  4. [remote-playback] Test prompt() fulfillment order (w3c/remote-playback#160) #64396 New/updated tests that depend on Queue tasks in parallel steps of RemotePlayback.prompt() w3c/remote-playback#160

Context: Chrome failures in https://w3c.github.io/test-results/remote-playback/all.html are largely caused by the 5s test clip, which is below Chrome's 15s minimum for remote playback.

- utils.js: add promptOnClick(), which calls prompt() synchronously from
  a click handler so it runs with transient activation, plus
  waitForEvent() and logRemotePlaybackEvents().
- prompt-and-select-device-manual.html and
  state-attribute-changes-when-selecting-device-manual.html: replace the
  outer async_test, which passed as soon as the button was clicked, with
  a single promise_test that waits for metadata, calls prompt() from the
  click handler, and checks the result. state-attribute-changes
  previously called prompt() from a watchAvailability() callback, which
  may run after transient activation has expired.
- prompt-and-watch-availability-no-device-manual.html: check
  availability in the watchAvailability() callback (which runs after the
  returned Promise resolves), call prompt() from the click handler, and
  accept NotFoundError (no UI shown) or NotAllowedError (UI shown and
  cancelled by the user).
- prompt-and-watch-availability-with-device-manual.html: check that the
  watchAvailability() callback reports true before prompting (instead of
  once after prompt() resolves), only enable the prompt button once a
  device is available, and report the actual rejection reason if
  prompt() fails.
- event-handlers-manual.html: use the onconnecting/onconnect/
  ondisconnect event handler attributes, and split into two sequential
  tests: connecting via prompt(), and disconnecting via a second
  prompt(). Check the state when each event fires.
@wpt-pr-bot

Copy link
Copy Markdown
Collaborator

There are no reviewers for this pull request besides its author. Please reach out on the chat room to get help with this. Thank you!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants