New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 785621 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Long OOO (go/where-is-mgiuca)
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 707649



Sign in to add a comment

Make it possible to write automated Web Platform Tests for Web Share

Project Member Reported by mgiuca@chromium.org, Nov 16 2017

Issue description

At the moment, there are a handful of automated tests for Web Share (navigator.share) in the web-platform-tests repo:
https://github.com/w3c/web-platform-tests/tree/master/web-share

But most of them are manual. This is because they trigger user-agent-specific UI which the test has to ask the user to interact with, then manually inspect the results (because the API invokes an arbitrary application which is allowed to interpret the data any way it wants).

In Chrome, we run this same set of tests automatically by mocking out the Mojo service and ensuring it is called with the right data, but this doesn't generalize to WPT.

Possibly we could do something similar to the mojo test by adding a WebDriver API that lets a test harness override the UI, simulate user actions, and inspect the data that would be received by the chosen target.
 

Comment 1 by mgiuca@chromium.org, Nov 16 2017

Blocking: 707649

Comment 2 by foolip@chromium.org, Nov 16 2017

Assuming that http://web-platform-tests.org/writing-tests/testdriver.html is used, would something like this make sense?

async_test(t => {
  test_driver.add_share_handler(t.step_func(data => {
    assert_equals(data.url, 'some resolved URL');
    t.done();
  }));
  navigator.share(something);
});

Comment 3 by foolip@chromium.org, Nov 16 2017

I filed https://github.com/w3c/web-platform-tests/issues/8278 in web-platform-tests. Are there people from other vendors who I should ping there?

Comment 4 by mgiuca@chromium.org, Nov 21 2017

Nobody else is currently implementing it.

Sign in to add a comment