Files
sousa-gecko/testing/web-platform/tests/permissions/edge-cases.https.html
T
Marcos Cáceres 3b3cdd64b5 Bug 1949610 [wpt PR 50850] - Permissions: add missing tests, a=testonly
Automatic update from web-platform-tests
Permissions: add missing tests (#50850)

* Permissions: add missing tests
Add tests for edge cases, event model, revocation, and worker permissions.

* Remove timeouts

* review 1

* round 2
--

wpt-commits: d01af4e7944f63a9002e6dc26ed5af28a4282dcc
wpt-pr: 50850
2025-06-30 09:18:54 +00:00

24 lines
801 B
HTML

<!DOCTYPE html>
<meta charset="utf-8" />
<title>Permissions API - Test invalid permission name</title>
<link rel="help" href="https://www.w3.org/TR/permissions/" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<body>
<script>
"use strict";
promise_test(async (t) => {
await promise_rejects_js(
t,
TypeError,
navigator.permissions.query({ name: "not-a-real-permission" }),
"Unsupported permission name should reject with TypeError"
);
}, "Query with an unsupported name rejects with TypeError");
</script>
</body>