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

Issue 730333 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Long OOO (go/where-is-mgiuca)
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

Upstream Web Share tests to Web Platform Tests repository

Project Member Reported by mgiuca@chromium.org, Jun 7 2017

Issue description

Our navigator.share tests currently reside in Chrome's LayoutTests folder:

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/webshare/

There are two parts:
1. idlharness (basic test that the interfaces are exposed correctly from WebIDL), and
2. Behaviour tests (the other files, that mock out the Mojo interface and test that the correct signals are sent to the browser and that the renderer behaves correctly when a signal is received from the browser).

Upstreaming these is difficult, for two reasons:
1. Organisationally, Web Share is not yet part of a W3C working group (other than WICG). I'm not sure these tests belong in WPT until Web Share is on standards track.
2. There is no cross-browser mechanism for stubbing out the UI of navigator.share. The best way to stub the UI is at the Mojo level, but this is Chrome-specific. We would need a cross-browser mechanism for injecting a fake at the right level in the API, such as is proposed here:
https://lists.w3.org/Archives/Public/public-test-infra/2017JanMar/0030.html
(I discuss Web Share in a reply to that message)

Web Share also discussed here:
https://groups.google.com/a/chromium.org/d/topic/platform-architecture-dev/ILmEdH1PXEg/discussion
 

Comment 1 Deleted

Comment 2 Deleted

raymes@ pointed out that you can add a manual test like this:

https://github.com/w3c/web-platform-tests/blob/master/geolocation-API/getCurrentPosition_permission_allow-manual.html

Basically it would just automate as much as possible but then put text on the page explaining to the user what actions to take manually or what things to observe, to consider the test successful. Maybe we can just do that?

Comment 4 by scheib@chromium.org, Jun 13 2017

Manual is better than none!

We also are seeing opportunity with the "Test API" approach. Web Bluetooth, WebUSB, and I believe WebVR are moving forward with it. A recent thread on public-test-infra:
https://lists.w3.org/Archives/Public/public-test-infra/2017AprJun/0080.html

Comment 5 by mgiuca@chromium.org, Jun 14 2017

scheib@: Do you think it's appropriate to start adding a manual test to WPT now, even though Web Share is not on a standards track outside of WICG?

Comment 6 by mgiuca@chromium.org, Jun 14 2017

Status: WontFix (was: Assigned)
Actually, it was fun and easy to convert to manual tests.

https://github.com/mgiuca/web-platform-tests/tree/webshare

I've opened an issue on WPT GitHub where we can continue discussing: https://github.com/w3c/web-platform-tests/issues/6234. Closing this Chrome bug.

Comment 7 by mgiuca@chromium.org, Jun 29 2017

Status: Fixed (was: WontFix)
The tests are now upstream in WPT:
https://github.com/w3c/web-platform-tests/pull/6287
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/web-share/

I will now proceed to a) downstream the changes that were made in the upstreaming PR, and b) delete the Chromium layout tests that are now redundant with automated WPT tests.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f2703bb4a656cdd8b1c058040fac0eac101643c0

commit f2703bb4a656cdd8b1c058040fac0eac101643c0
Author: Matt Giuca <mgiuca@chromium.org>
Date: Fri Jun 30 02:19:14 2017

Web Share layout tests: Update to synchronize with WPT manual tests.

The WPT (in external/wpt/web-share) contains manual tests for Web Share,
and Chrome has its own automated versions of those tests (using a mock
Mojo service). We can't delete the automated tests in favour of the
manual ones.

This CL applies a number of fixes to the layout tests to keep them in
sync with the upstream manual tests (these changes were made on the PR
to upstream the layout tests in the first place; see
https://github.com/w3c/web-platform-tests/pull/6287).

- Adds test share-url-relative (tests document base URL).
- Use document.baseURI instead of location to calculate absolute URL.
- share-nonutf8-encoding: Assert that the document character encoding is
  as expected. Also changed iso-8859-1 to windows-1252 (canonical name).
- share-types: More robust tests of url field and object stringification.
- share-success: Check that promise is resolved with undefined.
- mock-share-service: Reject promise if an exception is thrown (fixes
  silent failure in share_tests when navigator.share is missing).

Bug:  730333 
Change-Id: Ia27d149760af6b0494376c160da612ea2e947b8b
Reviewed-on: https://chromium-review.googlesource.com/554403
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483593}
[modify] https://crrev.com/f2703bb4a656cdd8b1c058040fac0eac101643c0/third_party/WebKit/LayoutTests/webshare/resources/mock-share-service.js
[modify] https://crrev.com/f2703bb4a656cdd8b1c058040fac0eac101643c0/third_party/WebKit/LayoutTests/webshare/share-nonutf8-encoding.html
[modify] https://crrev.com/f2703bb4a656cdd8b1c058040fac0eac101643c0/third_party/WebKit/LayoutTests/webshare/share-success.html
[modify] https://crrev.com/f2703bb4a656cdd8b1c058040fac0eac101643c0/third_party/WebKit/LayoutTests/webshare/share-types.html
[add] https://crrev.com/f2703bb4a656cdd8b1c058040fac0eac101643c0/third_party/WebKit/LayoutTests/webshare/share-url-relative.html

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3e00eabd54b4a0ff82463cd661e291de269c7bb

commit d3e00eabd54b4a0ff82463cd661e291de269c7bb
Author: Matt Giuca <mgiuca@chromium.org>
Date: Mon Jul 03 02:23:07 2017

Removed web share layout tests that duplicate web platform tests:

- idl.html
  (dupe of idlharness.https.html)
- share-types.html: share with an invalid URL
  (dupe of share-url-invalid.https.html)
- share-without-user-gesture.html
  (dupe of share-without-user-gesture.https.html)
- webshare-on-insecure-origin.html
  (dupe of share-securecontext.http.html)

The remaining tests in LayoutTests/webshare are automated versions of
the manual tests in WPT so they remain.

Bug:  730333 
Change-Id: I04bef0dc83273a95887a807688ad25fcfaf62143
Reviewed-on: https://chromium-review.googlesource.com/554850
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483925}
[modify] https://crrev.com/d3e00eabd54b4a0ff82463cd661e291de269c7bb/third_party/WebKit/LayoutTests/FlagExpectations/enable-network-service
[delete] https://crrev.com/f771ff3d4d3cf2a2d495a692a268c14d0654a02a/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/webshare-on-insecure-origin.html
[add] https://crrev.com/d3e00eabd54b4a0ff82463cd661e291de269c7bb/third_party/WebKit/LayoutTests/webshare/README.md
[delete] https://crrev.com/f771ff3d4d3cf2a2d495a692a268c14d0654a02a/third_party/WebKit/LayoutTests/webshare/idl.html
[modify] https://crrev.com/d3e00eabd54b4a0ff82463cd661e291de269c7bb/third_party/WebKit/LayoutTests/webshare/share-types.html
[delete] https://crrev.com/f771ff3d4d3cf2a2d495a692a268c14d0654a02a/third_party/WebKit/LayoutTests/webshare/share-without-user-gesture.html

Sign in to add a comment