Automatic update from web-platform-tests
Replace some "promise_rejects(t, 'SomeDOMError', stuff)" calls with promise_rejects_dom.
This diff was generated by running:
find . -type f -print0 | xargs -0 perl -pi -e "BEGIN { \$/ = undef; } s/promise_rejects\(([ \n]*[a-zA-Z_]+[ \n]*,[ \n]*)([\"'][A-Za-z_]*[\"']) *(, *.)/promise_rejects_dom(\1\2\3/gs"
in bash (doesn't work in tcsh, due to the $ inside "").
--
wpt-commits: b7f2dd315a8d84ce786f6336510ee51423011009
wpt-pr: 21600
20 lines
584 B
HTML
20 lines
584 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>WebShare Test: Share without user gesture error</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
promise_test(t => {
|
|
return promise_rejects_dom(
|
|
t, 'NotAllowedError',
|
|
navigator.share({title: 'the title', text: 'the message',
|
|
url: 'https://example.com'}));
|
|
}, 'share without a user gesture');
|
|
</script>
|
|
</body>
|
|
</html>
|