Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@2178efcc8f37b35a2f40f5e91f3ec278289e7b04
Using wpt-import in Chromium 141a1b9. With Chromium commits locally applied on WPT: 8ee2fbf "[WPT] Add WPT for BFCache eviction after version change event" 459de11 "[CompositeClipPathAnimations] Fix behavior for custom timing functions" Note to sheriffs: This CL imports external tests and adds expectations for those tests; if this CL is large and causes a few new failures, please fix the failures by adding new lines to TestExpectations rather than reverting. See: https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md NOAUTOREVERT=true R=rubber-stamper@appspot.gserviceaccount.com No-Export: true Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-input-fyi-rel,linux-blink-rel Change-Id: Iecb617434e89faf4a37ec61d5c6c6a70762a967d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4116409 Auto-Submit: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1084956}
- Loading branch information
Chromium WPT Sync
authored and
Chromium LUCI CQ
committed
Dec 19, 2022
1 parent
24d6236
commit e1ffbc3
Showing
3 changed files
with
57 additions
and
5 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
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
35 changes: 35 additions & 0 deletions
35
third_party/blink/web_tests/external/wpt/permissions/midi-permission.html
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,35 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<title>Test WebIDL conversion when querying the "midi" permission</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<div id="log"></div> | ||
|
||
<script> | ||
promise_test(async (test) => { | ||
let calledCount = 0; | ||
const status = await navigator.permissions.query({ | ||
get name() { | ||
calledCount++; | ||
return "midi"; | ||
}, | ||
}); | ||
assert_true(status instanceof PermissionStatus); | ||
assert_equals(status.name, "midi", `permission's name should be "midi"`); | ||
// | ||
// First call should be from: | ||
// | ||
// Let rootDesc be the object permissionDesc refers to, converted to an | ||
// IDL value of type PermissionDescriptor. | ||
// | ||
// Second from: | ||
// | ||
// Let typedDescriptor be the object permissionDesc refers to, | ||
// converted to an IDL value of rootDesc's name's permission descriptor | ||
// type. | ||
// | ||
// See: https://w3c.github.io/permissions/#query-method | ||
// | ||
assert_equals(calledCount, 2, "midi permission should be converted twice"); | ||
}, `querying the "midi" permission requires two WebIDL conversions`); | ||
</script> |