Make it possible to write automated Web Platform Tests for Web Share |
|
Issue descriptionAt 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.
,
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); });
,
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?
,
Nov 21 2017
Nobody else is currently implementing it. |
|
►
Sign in to add a comment |
|
Comment 1 by mgiuca@chromium.org
, Nov 16 2017