From 62489427035166f2bffb36ab4b2bc5d7c011c991 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Mon, 28 Sep 2020 19:33:23 +0000 Subject: [PATCH] Bug 1667023 [wpt PR 25755] - Web Share: restrict URL scheme to http and https, a=testonly Automatic update from web-platform-tests Web Share: restrict URL scheme to http and https We now follow the recent spec change limiting the permitted scheme for shared urls to http and https - see https://github.com/w3c/web-share/issues/173 https://github.com/w3c/web-share/pull/174 https://github.com/w3c/web-share/pull/177 We make an exception if the page performing the share it itself loaded from a different scheme (e.g. file) - in that case we allow the same scheme to be used for the shared url. Bug: 1131755 Change-Id: I6abf0f9acd40ef79ec49379314e2ef3a81d3467e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425977 Commit-Queue: Eric Willigers Reviewed-by: Glen Robertson Auto-Submit: Eric Willigers Cr-Commit-Position: refs/heads/master{#810180} -- wpt-commits: a28408e23e7cb1e4e8dc070445a51fc2f2d9a4e6 wpt-pr: 25755 UltraBlame original commit: 527027b783378db7e3c1fcdd908e718799400989 --- .../web-share/canShare.tentative.https.html | 119 ++++++++---------- 1 file changed, 51 insertions(+), 68 deletions(-) diff --git a/testing/web-platform/tests/web-share/canShare.tentative.https.html b/testing/web-platform/tests/web-share/canShare.tentative.https.html index f1c86bde0eb4d..63cdf176048e9 100644 --- a/testing/web-platform/tests/web-share/canShare.tentative.https.html +++ b/testing/web-platform/tests/web-share/canShare.tentative.https.html @@ -88,14 +88,13 @@ = > { -assert_equals +assert_false ( navigator . canShare ( ) -false ) ; } @@ -120,7 +119,7 @@ = > { -assert_equals +assert_false ( navigator . @@ -129,7 +128,6 @@ { } ) -false ) ; } @@ -149,7 +147,7 @@ = > { -assert_equals +assert_false ( navigator . @@ -157,7 +155,6 @@ ( undefined ) -false ) ; } @@ -183,7 +180,7 @@ = > { -assert_equals +assert_false ( navigator . @@ -191,7 +188,6 @@ ( null ) -false ) ; } @@ -217,7 +213,7 @@ = > { -assert_equals +assert_false ( navigator . @@ -232,7 +228,6 @@ ' } ) -false ) ; } @@ -291,7 +286,7 @@ 65536 ' ; -assert_equals +assert_false ( navigator . @@ -301,7 +296,6 @@ url } ) -false ) ; } @@ -321,7 +315,42 @@ = > { -assert_equals +assert_false +( +navigator +. +canShare +( +{ +url +: +' +data +: +the +url +' +} +) +) +; +} +' +canShare +with +data +URL +' +) +; +test +( +( +) += +> +{ +assert_false ( navigator . @@ -333,7 +362,6 @@ undefined } ) -false ) ; } @@ -358,7 +386,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -372,7 +400,6 @@ ' } ) -true ) ; } @@ -390,7 +417,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -404,7 +431,6 @@ ' } ) -true ) ; } @@ -422,7 +448,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -452,7 +478,6 @@ ' } ) -true ) ; } @@ -470,7 +495,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -482,7 +507,6 @@ null } ) -true ) ; } @@ -501,7 +525,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -513,7 +537,6 @@ 123 } ) -true ) ; } @@ -531,7 +554,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -561,7 +584,6 @@ } } ) -true ) ; } @@ -579,7 +601,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -616,7 +638,6 @@ ' } ) -true ) ; } @@ -635,43 +656,7 @@ = > { -assert_equals -( -navigator -. -canShare -( -{ -url -: -' -data -: -the -url -' -} -) -true -) -; -} -' -canShare -with -data -URL -' -) -; -test -( -( -) -= -> -{ -assert_equals +assert_true ( navigator . @@ -684,7 +669,6 @@ ' } ) -true ) ; } @@ -703,7 +687,7 @@ = > { -assert_equals +assert_true ( navigator . @@ -731,7 +715,6 @@ ' } ) -true ) ; }