Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add permission test for push api (#33200)
* Add permission test for push api * Add marcoscaceres to reviewers for Push API * Copy/pasta
- Loading branch information
1 parent
ac5e98e
commit 93068ae
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
spec: https://w3c.github.io/push-api/ | ||
suggested_reviewers: | ||
- beverloo | ||
- marcoscaceres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<title>Test push is a powerful feature via Permissions API</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
|
||
<script> | ||
promise_test(async (test) => { | ||
const status = await navigator.permissions.query({ name: "push" }); | ||
assert_true(status instanceof PermissionStatus); | ||
assert_equals(status.name, "push", `permission's name must be "push"`); | ||
assert_equals(status.state, "prompt", `permission's state must be "prompt" by default`); | ||
}, `Query "push" powerful feature`); | ||
</script> |