Bug 242502 - [Web share] canShare() validation returns incorrect result when sharing valid files but invalid URL
Summary: [Web share] canShare() validation returns incorrect result when sharing valid...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Marcos Caceres
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-07-08 02:54 PDT by Marcos Caceres
Modified: 2022-07-12 18:09 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos Caceres 2022-07-08 02:54:46 PDT
As shown in /LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/web-share/canShare.https-expected.txt, we are failing a test:

FAIL canShare() files member assert_false: invalid URL invalidates the share expected false got true

In WebKit, canShare() assumes that if any of the things passed are valid, then canShare() returns true. 

However, the spec says that, if something can't be shared, then canShare() should return false.
Comment 1 Marcos Caceres 2022-07-08 03:25:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2217
Comment 2 EWS 2022-07-12 18:08:09 PDT
Committed 252403@main (44186059d58a): <https://commits.webkit.org/252403@main>

Reviewed commits have been landed. Closing PR #2217 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-07-12 18:09:16 PDT
<rdar://problem/96921316>