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

Issue 738957 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Long OOO (go/where-is-mgiuca)
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Web Share: Spec change: Throw a TypeError if nothing is shared

Project Member Reported by mgiuca@chromium.org, Jul 4 2017

Issue description

Chrome Version: 61
OS: Android

What steps will reproduce the problem?
(1) In console, navigator.share({}).

What is the expected result?
TypeError

What happens instead?
Successful share with no data.

The spec was changed in https://github.com/WICG/web-share/pull/50.

(Also a minor change, the IDL should have "optional" for the ShareData parameter; this should not have any noticeable effect, still throwing a TypeError if used with no arguments, due to the above change.)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 13 2017

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

commit a6e2065dffc8ae4d3df8cc23434bd8cf097f89ca
Author: Matt Giuca <mgiuca@chromium.org>
Date: Thu Jul 13 00:34:53 2017

Web Share: Update implementation to match recent spec changes.

- Changed user gesture check from SecurityError to NotAllowedError.
- Throw a TypeError if no recognised fields in the ShareData dictionary.
- IDL: Made ShareData parameter optional (no behavioural effect, other
  than changing Navigator.share.length from 1 to 0).

Removed 3 tests that now fail. These have been converted into automated
tests in WPT so we are still running them, but they are upstream.

Fixed failing WPTs and removed expectations of failure.

Bug:  738956 ,  738957 
Change-Id: I2146a3dc98dd30dc591ea9ccaedf436ca1111531
Reviewed-on: https://chromium-review.googlesource.com/558595
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486184}
[modify] https://crrev.com/a6e2065dffc8ae4d3df8cc23434bd8cf097f89ca/chrome/android/javatests/src/org/chromium/chrome/browser/WebShareTest.java
[delete] https://crrev.com/681f7bf9c909d01aca60d1c9dfa2c00ade933c8a/third_party/WebKit/LayoutTests/external/wpt/web-share/idlharness.https-expected.txt
[delete] https://crrev.com/681f7bf9c909d01aca60d1c9dfa2c00ade933c8a/third_party/WebKit/LayoutTests/external/wpt/web-share/share-empty.https-expected.txt
[delete] https://crrev.com/681f7bf9c909d01aca60d1c9dfa2c00ade933c8a/third_party/WebKit/LayoutTests/external/wpt/web-share/share-without-user-gesture.https-expected.txt
[modify] https://crrev.com/a6e2065dffc8ae4d3df8cc23434bd8cf097f89ca/third_party/WebKit/LayoutTests/webshare/share-success.html
[modify] https://crrev.com/a6e2065dffc8ae4d3df8cc23434bd8cf097f89ca/third_party/WebKit/LayoutTests/webshare/share-types.html
[modify] https://crrev.com/a6e2065dffc8ae4d3df8cc23434bd8cf097f89ca/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
[modify] https://crrev.com/a6e2065dffc8ae4d3df8cc23434bd8cf097f89ca/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl

Comment 2 by mgiuca@chromium.org, Jul 13 2017

Status: Fixed (was: Started)

Sign in to add a comment