Diff
Modified: trunk/LayoutTests/ChangeLog (264563 => 264564)
--- trunk/LayoutTests/ChangeLog 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/ChangeLog 2020-07-18 02:24:22 UTC (rev 264564)
@@ -1,5 +1,15 @@
2020-07-17 Chris Dumez <[email protected]>
+ Resync web-platform-tests/web-share from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=214507
+
+ Reviewed by Alex Christensen.
+
+ * TestExpectations:
+ * platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt:
+
+2020-07-17 Chris Dumez <[email protected]>
+
Resync web-platform-tests/encoding from upstream
https://bugs.webkit.org/show_bug.cgi?id=214502
Modified: trunk/LayoutTests/TestExpectations (264563 => 264564)
--- trunk/LayoutTests/TestExpectations 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/TestExpectations 2020-07-18 02:24:22 UTC (rev 264564)
@@ -830,10 +830,6 @@
# Sometimes logs a line about trying to connect to an external URL.
imported/w3c/web-platform-tests/content-security-policy/frame-src/frame-src-same-document.sub.html [ Pass Failure ]
-# Web platform test infrastructure unable to support insecure connection
-imported/w3c/web-platform-tests/web-share/canShare-insecure.http.html
-imported/w3c/web-platform-tests/web-share/share-securecontext.http.html
-
# Only relevant on macOS
css3/color-filters/punch-out-white-backgrounds.html [ Skip ]
@@ -942,6 +938,7 @@
# The Web Share API is currently only implemented for modern WebKit on iOS and macOS
fast/web-share [ Skip ]
+imported/w3c/web-platform-tests/web-share [ Skip ]
# This test was created to test a mac-wk2 bugfix
fast/animation/request-animation-frame-in-two-pages.html [ Skip ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (264563 => 264564)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-18 02:24:22 UTC (rev 264564)
@@ -1,5 +1,63 @@
2020-07-17 Chris Dumez <[email protected]>
+ Resync web-platform-tests/web-share from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=214507
+
+ Reviewed by Alex Christensen.
+
+ Resync web-platform-tests/web-share from upstream 81de986322a0de90f2fe895.
+
+ * web-platform-tests/web-share/canShare-files.tentative.https-expected.txt: Added.
+ * web-platform-tests/web-share/canShare-files.tentative.https.html: Added.
+ * web-platform-tests/web-share/canShare-insecure.tentative.http-expected.txt: Added.
+ * web-platform-tests/web-share/canShare-insecure.tentative.http.html: Added.
+ * web-platform-tests/web-share/canShare.tentative.https-expected.txt: Added.
+ * web-platform-tests/web-share/canShare.tentative.https.html: Added.
+ * web-platform-tests/web-share/idlharness.https.window.js:
+ * web-platform-tests/web-share/share-cancel-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-cancel-manual.https.html: Added.
+ * web-platform-tests/web-share/share-consume-activation.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-consume-activation.https.html: Added.
+ * web-platform-tests/web-share/share-empty.https.html:
+ * web-platform-tests/web-share/share-extra-argument-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-extra-argument-manual.https.html: Added.
+ * web-platform-tests/web-share/share-extra-field-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-extra-field-manual.https.html: Added.
+ * web-platform-tests/web-share/share-files-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-files-manual.https.html: Added.
+ * web-platform-tests/web-share/share-image-manual.tentative.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-image-manual.tentative.https.html: Added.
+ * web-platform-tests/web-share/share-non-string-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-non-string-manual.https.html: Added.
+ * web-platform-tests/web-share/share-null-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-null-manual.https.html: Added.
+ * web-platform-tests/web-share/share-sharePromise-internal-slot.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-sharePromise-internal-slot.https.html: Added.
+ * web-platform-tests/web-share/share-simple-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-simple-manual.https.html: Added.
+ * web-platform-tests/web-share/share-unicode-strings-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-unicode-strings-manual.https.html: Added.
+ * web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https.html: Added.
+ * web-platform-tests/web-share/share-url-data-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-url-data-manual.https.html: Added.
+ * web-platform-tests/web-share/share-url-empty-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-url-empty-manual.https.html: Added.
+ * web-platform-tests/web-share/share-url-encoding-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-url-encoding-manual.https.html: Added.
+ * web-platform-tests/web-share/share-url-invalid.https-expected.txt:
+ * web-platform-tests/web-share/share-url-invalid.https.html:
+ * web-platform-tests/web-share/share-url-noscheme-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-url-noscheme-manual.https.html: Added.
+ * web-platform-tests/web-share/share-url-pathonly-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-url-pathonly-manual.https.html: Added.
+ * web-platform-tests/web-share/share-url-relative-manual.https-expected.txt: Added.
+ * web-platform-tests/web-share/share-url-relative-manual.https.html: Added.
+ * web-platform-tests/web-share/share-without-user-gesture.https.html:
+ * web-platform-tests/web-share/w3c-import.log:
+
+2020-07-17 Chris Dumez <[email protected]>
+
Resync web-platform-tests/encoding from upstream
https://bugs.webkit.org/show_bug.cgi?id=214502
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-files.tentative.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-files.tentative.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-files.tentative.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,8 @@
+
+PASS canShare with single file
+PASS canShare with empty file list
+PASS canShare with single file list
+PASS canShare with file list
+PASS canShare with repeated file
+PASS canShare with file list and url
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-files.tentative.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-files.tentative.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-files.tentative.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: canShare with files</title>
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ 'use strict';
+ const textFile = new File(['hello'], 'hello.txt', {type:'text/plain'});
+ const emptyFile = new File([''], 'empty');
+
+ test(() => {
+ assert_throws_js(TypeError, () => { navigator.canShare({files: textFile}) });
+ }, 'canShare with single file');
+
+ test(() => {
+ assert_equals(navigator.canShare({files: []}), false);
+ }, 'canShare with empty file list');
+
+ test(() => {
+ assert_equals(navigator.canShare({files: [emptyFile]}), true);
+ }, 'canShare with single file list');
+
+ test(() => {
+ assert_equals(navigator.canShare({files: [textFile, emptyFile]}), true);
+ }, 'canShare with file list');
+
+ test(() => {
+ assert_equals(navigator.canShare({files: [textFile, emptyFile, textFile]}), true);
+ }, 'canShare with repeated file');
+
+ test(() => {
+ assert_equals(navigator.canShare({url: 'https://example.com/', files: [textFile, emptyFile]}), true);
+ }, 'canShare with file list and url');
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-insecure.tentative.http-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-insecure.tentative.http-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-insecure.tentative.http-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,3 @@
+
+FAIL navigator.canShare must be undefined in non-secure context assert_false: navigator has attribute 'canShare'. expected false got true
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-insecure.tentative.http.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-insecure.tentative.http.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare-insecure.tentative.http.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: canShare from non-secure context</title>
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ test(() => {
+ assert_false('canShare' in navigator, 'navigator has attribute \'canShare\'.');
+ }, 'navigator.canShare must be undefined in non-secure context');
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare.tentative.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare.tentative.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare.tentative.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,19 @@
+
+PASS canShare with no arguments (same as empty dictionary)
+PASS canShare with an empty dictionary
+PASS canShare with a undefined argument (same as empty dictionary)
+PASS canShare with a null argument (same as empty dictionary)
+PASS canShare with a dictionary containing only surplus fields
+PASS canShare with an invalid URL
+PASS canShare with attribute undefined is equivalent to omitting the attribute
+PASS canShare with title
+PASS canShare with text
+PASS canShare with URL
+PASS canShare with null attribute
+PASS canShare with number
+PASS canShare with object
+PASS canShare with unexpected field
+PASS canShare with data URL
+PASS canShare with empty URL
+PASS canShare with URL having no scheme
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare.tentative.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare.tentative.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare.tentative.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: canShare without files</title>
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ 'use strict';
+
+ test(() => {
+ assert_equals(navigator.canShare(), false);
+ }, 'canShare with no arguments (same as empty dictionary)');
+
+ test(() => {
+ assert_equals(navigator.canShare({}), false);
+ }, 'canShare with an empty dictionary');
+
+ test(() => {
+ assert_equals(navigator.canShare(undefined), false);
+ }, 'canShare with a undefined argument (same as empty dictionary)');
+
+ test(() => {
+ assert_equals(navigator.canShare(null), false);
+ }, 'canShare with a null argument (same as empty dictionary)');
+
+ test(() => {
+ assert_equals(navigator.canShare({unused: 'unexpected field'}), false);
+ }, 'canShare with a dictionary containing only surplus fields');
+
+ test(() => {
+ // URL is invalid in that the URL Parser returns failure (port is too
+ // large).
+ const url = '';
+ assert_equals(navigator.canShare({url}), false);
+ }, 'canShare with an invalid URL');
+
+ test(() => {
+ assert_equals(navigator.canShare({title: undefined}), false);
+ }, 'canShare with attribute undefined is equivalent to omitting the attribute');
+
+ test(() => {
+ assert_equals(navigator.canShare({title: 'subject'}), true);
+ }, 'canShare with title');
+
+ test(() => {
+ assert_equals(navigator.canShare({text: 'body'}), true);
+ }, 'canShare with text');
+
+ test(() => {
+ assert_equals(navigator.canShare({url: 'https://www.example.com/some/path?some_query#some_fragment'}), true);
+ }, 'canShare with URL');
+
+ test(() => {
+ assert_equals(navigator.canShare({title: null}), true);
+ }, 'canShare with null attribute');
+
+ test(() => {
+ assert_equals(navigator.canShare({text: 123}), true);
+ }, 'canShare with number');
+
+ test(() => {
+ assert_equals(navigator.canShare({url: {toString() { return 'https://example.com/'; }}}), true);
+ }, 'canShare with object');
+
+ test(() => {
+ assert_equals(navigator.canShare({title: 'subject', text: 'body', url: 'https://example.com/', unused: 'unexpected field'}), true);
+ }, 'canShare with unexpected field');
+
+ test(() => {
+ assert_equals(navigator.canShare({url: 'data:the url'}), true);
+ }, 'canShare with data URL');
+
+ test(() => {
+ assert_equals(navigator.canShare({url: ''}), true);
+ }, 'canShare with empty URL');
+
+ test(() => {
+ assert_equals(navigator.canShare({url: '//www.example.com/some/path?some_query#some_fragment'}), true);
+ }, 'canShare with URL having no scheme');
+ </script>
+ </body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/idlharness.https.window.js (264563 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/idlharness.https.window.js 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/idlharness.https.window.js 2020-07-18 02:24:22 UTC (rev 264564)
@@ -1,5 +1,6 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
+// META: timeout=long
// https://w3c.github.io/web-share/
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-cancel-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-cancel-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-cancel-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,10 @@
+Instructions:
+
+Click the Share button.
+Cancel the share dialog.
+
+
+Harness Error (TIMEOUT), message = null
+
+TIMEOUT share with user cancellation Test timed out
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-cancel-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-cancel-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-cancel-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share cancelled by user</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ setupManualShareTestRequiringCancellation();
+
+ promise_test(t => {
+ return callWhenButtonClicked(() => promise_rejects_dom(
+ t, 'AbortError',
+ navigator.share({title: 'the title', text: 'the message',
+ url: 'https://example.com'})));
+ }, 'share with user cancellation');
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,3 @@
+
+FAIL Calling share consumes user activation promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException NotAllowedError: property "code" is equal to undefined, expected 0
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>WebShare Test: consume user activation</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ promise_test(async t => {
+ // Not activated by user gesture, so not allowed!
+ await promise_rejects_dom(t, "NotAllowedError", navigator.share());
+
+ await test_driver.bless("web share");
+
+ // We have a gesture, but the URL is invalid - so TypeError!
+ await promise_rejects_js(
+ t,
+ TypeError,
+ navigator.share({ url: "http://example.com:65536" })
+ );
+
+ // The activation has been consumed, so calling share() again would require
+ // a new gesture.
+ await promise_rejects_dom(t, "NotAllowedError", navigator.share());
+ }, "Calling share consumes user activation");
+ </script>
+ </body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-empty.https.html (264563 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-empty.https.html 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-empty.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -1,34 +1,49 @@
<!DOCTYPE html>
<html>
<head>
- <meta charset="utf-8">
+ <meta charset="utf-8" />
<title>WebShare Test: Share no known fields</title>
<script src=""
<script src=""
<script src=""
+ <script src=""
+ <script src=""
</head>
<body>
<script>
- promise_test(t => {
+ promise_test(async t => {
+ await test_driver.bless("web share", () => {
return promise_rejects_js(t, TypeError, navigator.share());
- }, 'share with no arguments (same as empty dictionary)');
+ });
+ }, "share with no arguments (same as empty dictionary)");
- promise_test(t => {
+ promise_test(async t => {
+ await test_driver.bless("web share", () => {
return promise_rejects_js(t, TypeError, navigator.share({}));
- }, 'share with an empty dictionary');
+ });
+ }, "share with an empty dictionary");
- promise_test(t => {
+ promise_test(async t => {
+ await test_driver.bless("web share", () => {
return promise_rejects_js(t, TypeError, navigator.share(undefined));
- }, 'share with a undefined argument (same as empty dictionary)');
+ });
+ }, "share with a undefined argument (same as empty dictionary)");
- promise_test(t => {
+ promise_test(async t => {
+ await test_driver.bless("web share", () => {
return promise_rejects_js(t, TypeError, navigator.share(null));
- }, 'share with a null argument (same as empty dictionary)');
+ });
+ }, "share with a null argument (same as empty dictionary)");
- promise_test(t => {
- return promise_rejects_js(t,
- TypeError, navigator.share({unused: 'unexpected field'}));
- }, 'share with a dictionary containing only surplus fields');
+ promise_test(async t => {
+ await test_driver.bless("web share", () => {
+ return promise_rejects_js(
+ t,
+ TypeError,
+ navigator.share({ unused: "unexpected field" })
+ );
+ });
+ }, "share with a dictionary containing only surplus fields");
</script>
</body>
</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "the title"
+text = "the message"
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Surplus arguments ignored</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ setupManualShareTest(
+ {title: 'the title', text: 'the message', url: 'https://example.com'});
+ callWhenButtonClicked(() => navigator.share(
+ {title: 'the title', text: 'the message', url: 'https://example.com'},
+ 'more than required'));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "the title"
+text = "the message"
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Surplus fields ignored</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ setupManualShareTest(
+ {title: 'the title', text: 'the message', url: 'https://example.com'});
+ callWhenButtonClicked(() => navigator.share(
+ {title: 'the title', text: 'the message', url: 'https://example.com',
+ unused: 'unexpected field'}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,20 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "Counting to 5"
+text = "Here are the numbers"
+url = ""
+files = 5 file(s)
+one
+two
+three
+four
+five
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share multiple files</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const options = {type: 'text/plain'};
+ const first = new File(['one'], 'first.txt', options);
+ const second = new File(['two'], 'second.txt', options);
+ const third = new File(['three'], 'third.txt', options);
+ const fourth = new File(['four'], 'fourth.txt', options);
+ const fifth = new File(['five'], 'fifth.txt', options);
+ const data = {
+ title: 'Counting to 5',
+ text: 'Here are the numbers',
+ url: 'https://example.com/',
+ files: [first, second, third, fourth, fifth]
+ };
+ setupManualShareTest(data);
+ callWhenButtonClicked(() => navigator.share(data));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,16 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = ""
+text = ""
+url = ""
+files = 1 file(s)
+
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share single image file</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const fileBits = [
+ '<svg xmlns="http://www.w3.org/2000/svg" width="80px" height="80px">',
+ '<circle cx="40" cy="40" r="28" fill="lime" />',
+ '</svg>'
+ ];
+ const fileName = 'circle.svg';
+ const options = {type: 'image/svg+xml'};
+ const file = new File(fileBits, fileName, options);
+ setupManualShareTest({title: '', text: '', url: '', files: [file]});
+ callWhenButtonClicked(() => navigator.share({files: [file]}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-non-string-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-non-string-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-non-string-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "true"
+text = "the object"
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-non-string-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-non-string-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-non-string-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share non-string types (test implicit conversion)</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ // Expect that each of the non-string values is converted into a string.
+ setupManualShareTest(
+ {title: 'true', text: 'the object', url: getAbsoluteUrl('384957')});
+
+ const objectWithToString = {toString() { return 'the object'; }};
+ callWhenButtonClicked(() => navigator.share(
+ {title: true, text: objectWithToString, url: 384957}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-null-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-null-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-null-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "null"
+text = ""
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-null-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-null-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-null-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share null and undefined values</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ // Expect null to be converted into the string 'null'. On the other
+ // hand, undefined should be equivalent to omitting the attribute.
+ setupManualShareTest(
+ {title: 'null', text: '', url: getAbsoluteUrl('null')});
+ callWhenButtonClicked(() => navigator.share(
+ {title: null, text: undefined, url: null}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,4 @@
+
+
+FAIL Only allow one share call at a time, which is controlled by the [[sharePromise]] internal slot. promise_rejects_dom: function "function () { throw e }" threw object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <link rel="help" href="" />
+ <title>WebShare Test: only one share at a time</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <button>
+ <script>
+ setup({ allow_uncaught_exception:true });
+ promise_test(async t => {
+ const button = document.querySelector("button");
+ const p = new Promise(r => {
+ button._onclick_ = () => {
+ const promises = [];
+ promises.push(
+ navigator.share({ title: "should be pending" }),
+ navigator.share({ title: "should reject" }),
+ navigator.share({ title: "should also reject" })
+ );
+ r(promises);
+ };
+ });
+ test_driver.click(button);
+ const [, promise2, promise3] = await p;
+ await Promise.all([
+ promise_rejects_dom(t, "InvalidStateError", promise2),
+ promise_rejects_dom(t, "InvalidStateError", promise3)
+ ]);
+ }, "Only allow one share call at a time, which is controlled by the [[sharePromise]] internal slot.");
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-simple-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-simple-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-simple-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "the title"
+text = "the message"
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-simple-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-simple-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-simple-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Simple share</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const url = '';
+ setupManualShareTest({title: 'the title', text: 'the message', url});
+ callWhenButtonClicked(() => navigator.share(
+ {title: 'the title', text: 'the message', url})).then(
+ result => {
+ // Check that promise resolved with undefined. This is guarded
+ // by an if statement because we do not want it to register as a
+ // test if it passes (since this is a manual test).
+ if (result !== undefined) {
+ assert_equals(result, undefined);
+ }
+ });
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "fáncy 写作 😱"
+text = "�x"
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share with non-ASCII Unicode strings</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ // Title is a string with BMP and non-BMP characters.
+ // Text contains invalid surrogates which should be converted into U+FFFD.
+ // URL contains non-ASCII characters in host and path.
+ const title = 'fáncy 写作 😱';
+ const url = '';
+ // Host is IDNA-encoded. Path is percent-encoded.
+ const url_ascii = 'https://xn--0zwm56d.example.com/%F0%9F%93%84';
+ setupManualShareTest({title, text: '\ufffdx', url: url_ascii});
+ callWhenButtonClicked(() => navigator.share({title, text: '\ud9a3x', url}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = "fáncy 写作 😱"
+text = "�x"
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="windows-1252">
+ <title>WebShare Test: Share with non-ASCII Unicode strings in a Latin-1-encoded page</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ assert_equals(document.characterSet, 'windows-1252');
+
+ // Exact same test as in share-unicode-strings-manual.html, with same
+ // expectations. This tests that the page's encoding (ISO-8859-1) is
+ // ignored and Unicode characters are always percent-encoded in UTF-8.
+ const title = 'f\xe1ncy \u5199\u4f5c \ud83d\ude31';
+ const url = '';
+ // Host is IDNA-encoded. Path is percent-encoded with UTF-8.
+ const url_ascii = 'https://xn--0zwm56d.example.com/%F0%9F%93%84';
+ setupManualShareTest({title, text: '\ufffdx', url: url_ascii});
+ callWhenButtonClicked(() => navigator.share({title, text: '\ud9a3x', url}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-data-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-data-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-data-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = ""
+text = ""
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-data-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-data-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-data-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share with data URL</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const url = '';
+ setupManualShareTest({title: '', text: '', url: getAbsoluteUrl(url)});
+ callWhenButtonClicked(() => navigator.share({url}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = ""
+text = ""
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share with empty URL</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ setupManualShareTest({title: '', text: '', url: document.baseURI});
+ callWhenButtonClicked(() => navigator.share({url: ''}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = ""
+text = ""
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share URL with illegal characters (test percent encoding)</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const url = '';
+ // Expect '\' to normalize to '/', "%63" to normalize to 'c', '\r\n\t'
+ // to be removed, and all the other illegal characters to be percent-escaped.
+ const url_encoded = 'http://example.com/foo/abc%20%22%3C%3E%60%7B%7D';
+ setupManualShareTest({title: '', text: '', url: url_encoded});
+ callWhenButtonClicked(() => navigator.share({url}));
+ </script>
+ </body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt (264563 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -1,3 +1,3 @@
-FAIL share with an invalid URL navigator.share is not a function. (In 'navigator.share({url})', 'navigator.share' is undefined)
+FAIL share() rejects when URL is invalid promise_test: Unhandled rejection with value: object "TypeError: navigator.share is not a function. (In 'navigator.share({ url })', 'navigator.share' is undefined)"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-invalid.https.html (264563 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-invalid.https.html 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-invalid.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -1,20 +1,25 @@
<!DOCTYPE html>
<html>
<head>
- <meta charset="utf-8">
+ <meta charset="utf-8" />
<title>WebShare Test: Share with an invalid URL</title>
<script src=""
<script src=""
+ <script src=""
+ <script src=""
</head>
<body>
<script>
- promise_test(t => {
- // URL is invalid in that the URL Parser returns failure (port is too
- // large).
- const url = '';
- return promise_rejects_js(
- t, TypeError, navigator.share({url}));
- }, 'share with an invalid URL');
+ promise_test(async t => {
+ const url = ""
+ await test_driver.bless(
+ "web share",
+ () => {
+ return promise_rejects_js(t, TypeError, navigator.share({ url }));
+ },
+ "share with an invalid URL"
+ );
+ }, "share() rejects when URL is invalid");
</script>
</body>
</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = ""
+text = ""
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share with URL without a scheme</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const url = '';
+ setupManualShareTest({title: '', text: '', url: getAbsoluteUrl(url)});
+ callWhenButtonClicked(() => navigator.share({url}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = ""
+text = ""
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share with absolute path-only URL</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const url = '';
+ setupManualShareTest({title: '', text: '', url: getAbsoluteUrl(url)});
+ callWhenButtonClicked(() => navigator.share({url}));
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https-expected.txt (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,14 @@
+Instructions:
+
+Click the Share button.
+Choose a valid share target.
+Pass the test iff the target app received:
+
+title = ""
+text = ""
+url = ""
+
+
+Harness Error (TIMEOUT), message = null
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https.html (0 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebShare Test: Share with relative URL</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ <base href=""
+ </head>
+ <body>
+ <script>
+ setup({explicit_timeout: true});
+
+ const url = '';
+ setupManualShareTest({title: '', text: '', url: getAbsoluteUrl(url)});
+ callWhenButtonClicked(() => navigator.share({url}));
+ </script>
+ </body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-without-user-gesture.https.html (264563 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-without-user-gesture.https.html 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-without-user-gesture.https.html 2020-07-18 02:24:22 UTC (rev 264564)
@@ -9,7 +9,7 @@
<body>
<script>
promise_test(t => {
- return promise_rejects(
+ return promise_rejects_dom(
t, 'NotAllowedError',
navigator.share({title: 'the title', text: 'the message',
url: 'https://example.com'}));
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/w3c-import.log (264563 => 264564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/w3c-import.log 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/w3c-import.log 2020-07-18 02:24:22 UTC (rev 264564)
@@ -20,10 +20,11 @@
/LayoutTests/imported/w3c/web-platform-tests/web-share/canShare.tentative.https.html
/LayoutTests/imported/w3c/web-platform-tests/web-share/idlharness.https.window.js
/LayoutTests/imported/w3c/web-platform-tests/web-share/share-cancel-manual.https.html
+/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https.html
/LayoutTests/imported/w3c/web-platform-tests/web-share/share-empty.https.html
/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https.html
/LayoutTests/imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https.html
-/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.tentative.https.html
+/LayoutTests/imported/w3c/web-platform-tests/web-share/share-files-manual.https.html
/LayoutTests/imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https.html
/LayoutTests/imported/w3c/web-platform-tests/web-share/share-non-string-manual.https.html
/LayoutTests/imported/w3c/web-platform-tests/web-share/share-null-manual.https.html
Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (264563 => 264564)
--- trunk/LayoutTests/platform/ios-wk2/TestExpectations 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2020-07-18 02:24:22 UTC (rev 264564)
@@ -19,6 +19,7 @@
scrollingcoordinator [ Pass ]
scrollingcoordinator/mac [ Skip ]
fast/web-share [ Pass ]
+imported/w3c/web-platform-tests/web-share [ Pass ]
editing/caret/ios [ Pass ]
editing/find [ Pass ]
editing/input/ios [ Pass ]
@@ -1692,6 +1693,26 @@
webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/text-indent-vrl-014.xht [ ImageOnlyFailure ]
webkit.org/b/209080 imported/w3c/web-platform-tests/css/css-writing-modes/text-indent-vrl-016.xht [ ImageOnlyFailure ]
+# Manual tests.
+imported/w3c/web-platform-tests/web-share/share-cancel-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-files-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-non-string-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-null-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-simple-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-data-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https.html [ Skip ]
+
+imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https.html [ DumpJSConsoleLogInStdErr ]
+
# rdar://problem/59595496
quicklook/keynote-09.html [ Failure ]
quicklook/keynote.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (264563 => 264564)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2020-07-18 02:24:22 UTC (rev 264564)
@@ -17,6 +17,7 @@
fast/scrolling/mac [ Pass ]
fast/visual-viewport/tiled-drawing [ Pass ]
fast/web-share [ Pass ]
+imported/w3c/web-platform-tests/web-share [ Pass ]
scrollingcoordinator [ Pass ]
scrollingcoordinator/ios [ Skip ]
swipe [ Pass ]
@@ -793,6 +794,25 @@
imported/w3c/web-platform-tests/payment-request/user-abort-algorithm-manual.https.html [ Skip ]
imported/w3c/web-platform-tests/payment-request/user-accepts-payment-request-algo-manual.https.html [ Skip ]
+# Manual tests.
+imported/w3c/web-platform-tests/web-share/share-cancel-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-extra-argument-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-extra-field-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-files-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-image-manual.tentative.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-non-string-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-null-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-simple-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-unicode-strings-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-unicode-strings-nonutf8-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-data-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-empty-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-encoding-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-noscheme-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-pathonly-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-url-relative-manual.https.html [ Skip ]
+imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https.html [ Timeout ]
+
webkit.org/b/189598 compositing/backing/backing-store-attachment-fill-forwards-animation.html [ Pass Failure ]
# Local authenticator tests require restricted keychain entitlement, which cannot be signed with ad hoc signing.
@@ -1059,4 +1079,4 @@
webkit.org/b/214478 [ Debug ] tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html [ Skip ]
webkit.org/b/214478 [ Debug ] webrtc/certificates-indexeddb.html [ Skip ]
webkit.org/b/214478 [ Debug ] webrtc/h265.html [ Skip ]
-webkit.org/b/214478 [ Debug ] webrtc/simulcast-h264.html [ Skip ]
\ No newline at end of file
+webkit.org/b/214478 [ Debug ] webrtc/simulcast-h264.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt (264563 => 264564)
--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt 2020-07-18 02:07:00 UTC (rev 264563)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt 2020-07-18 02:24:22 UTC (rev 264564)
@@ -1,3 +1,3 @@
-PASS share with an invalid URL
+PASS share() rejects when URL is invalid