Skip to content

Commit

Permalink
Bug 1808293 [wpt PR 37732] - [Sub Apps] Limit add() calls to at most …
Browse files Browse the repository at this point in the history
…7 apps, a=testonly

Automatic update from web-platform-tests
[Sub Apps] Limit add() calls to at most 7 apps

To avoid overwhelming the user with an overloaded permissions prompt,
only allow 7 apps to be added at once.

Bug: 1402192
Test: third_party/blink/tools/run_web_tests.py external/wpt/subapps
Change-Id: I7ebb34c3700fdbf1b699debe78228d3bc4b889cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4127312
Reviewed-by: Ivan Šandrk <[email protected]>
Reviewed-by: Jeremy Roman <[email protected]>
Commit-Queue: Philipp Weiß <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1090745}

--

wpt-commits: 9db183a1c94a81f3963528e3b075e6c33270240d
wpt-pr: 37732
  • Loading branch information
Philipp Weiß authored and moz-wptsync-bot committed Jan 18, 2023
1 parent 56e0878 commit 7690dba
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions testing/web-platform/tests/subapps/add-error.tentative.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@
await promise_rejects_dom(t, 'NotAllowedError', navigator.subApps.add(subapp));
}, 'Missing user activation.');

promise_test(async t => {
const same_origin_url = document.location.origin + '/sub-app-';

let add_call_params = {};
for (let i = 0; i < 8; i++) {
const url = same_origin_url + i;
add_call_params[url] = { install_url: url };
}

await test_driver.bless("installing subapps", async function () {
await promise_rejects_dom(t, 'DataError', navigator.subApps.add(add_call_params));
});
}, 'Too many subapps at once.');

promise_test(async t => {
let add_call_params = {};

Expand Down

0 comments on commit 7690dba

Please sign in to comment.